| com.sun.portal.common.service.ServiceContext
All known Subclasses: com.sun.portal.common.service.impl.ServiceContextImpl,
ServiceContext | public interface ServiceContext (Code) | | Defines a set of methods that a services uses to communicate with
its service container.
A ServiceContext groups a set of services.
The ServiceContext object is contained within the ServiceConfig
object, which the service container provides the service when the
service is initialized.
author: Alejandro Abdelnur |
Method Summary | |
public Object | getAttribute(String name) Returns the service container attribute with the given name, or null
if there is no attribute by that name. | public Iterator | getAttributeNames() Returns an Iterator containing the attribute names available within
this service context. | public String | getInitParameter(String name) Returns a String containing the value of the named context-wide
initialization parameter, or null if the parameter does not exist. | public Iterator | getInitParameterNames() Returns the names of the context's initialization parameters as
an Iterator of String objects, or an empty Iterator if the context
has no initialization parameters. | public Service | getService(String name) Returns a service from a ServiceContext. | public void | removeAttribute(String name) Removes the attribute with the given name from the service context. | public void | setAttribute(String name, Object value) Binds an object to a given attribute name in this service context. |
getAttribute | public Object getAttribute(String name)(Code) | | Returns the service container attribute with the given name, or null
if there is no attribute by that name.
Parameters: name - a String specifying the name of the attribute an Object containing the value of the attribute, or nullif no attribute exists matching the given name |
getAttributeNames | public Iterator getAttributeNames()(Code) | | Returns an Iterator containing the attribute names available within
this service context. Use the getAttribute(java.lang.String) method
with an attribute name to get the value of an attribute.
an Iterator of attribute names |
getInitParameter | public String getInitParameter(String name)(Code) | | Returns a String containing the value of the named context-wide
initialization parameter, or null if the parameter does not exist.
Parameters: name - a String containing the name of the parameter whosevalue is requested a String containing at value of the specified parameter |
getInitParameterNames | public Iterator getInitParameterNames()(Code) | | Returns the names of the context's initialization parameters as
an Iterator of String objects, or an empty Iterator if the context
has no initialization parameters.
an Iterator of String objects containing the names of thecontext's initialization parameters |
getService | public Service getService(String name)(Code) | | Returns a service from a ServiceContext.
Parameters: name - a String with the name ofthe service to retrieve the service with the specified name or null if theservice does not exist |
removeAttribute | public void removeAttribute(String name)(Code) | | Removes the attribute with the given name from the service context.
After removal, subsequent calls to getAttribute(java.lang.String)
to retrieve the attribute's value will return null.
Parameters: name - a String specifying the name of the attribute |
setAttribute | public void setAttribute(String name, Object value)(Code) | | Binds an object to a given attribute name in this service context.
If the name specified is already used for an attribute, this method
will replace the attribute with the new to the new attribute.
Parameters: name - a String specifying the name of the attribute value an Object representing the attribute to be bound |
|
|