| org.cougaar.core.component.ServiceBroker
ServiceBroker | public interface ServiceBroker (Code) | | Cougaar component Service Broker.
Note that this was previously called Services in deference to
the analogous BeanContextServices object.
See Also: java.beans.beancontext.BeanContextServices See Also: |
addService | boolean addService(Class> serviceClass, ServiceProvider serviceProvider)(Code) | | Add a Service to this Services Context.
true IFF successful and not redundant. |
addServiceListener | void addServiceListener(ServiceListener sl)(Code) | | Add a ServiceListener to this Services Context. *
|
getCurrentServiceClasses | Iterator<Class<?>> getCurrentServiceClasses()(Code) | | Gets the currently available services for this context.
All standard implementations return an Iterator over a copy of the set of ServiceClasses
so that there is no risk of ComodificationException.
|
getService | T getService(Object requestor, Class<T> serviceClass, ServiceRevokedListener srl)(Code) | | get an instance of the requested service from a service provider associated
with this context.
May return null (if no provider found) and various RuntimeExceptions may be
thrown by the associated ServiceProvider. The ServiceBroker itself may
throw ClassCastException if the ServiceProvider returns a non-null
service object which is not an instance of the requested serviceClass.
Note that a successful call to getService almost always implies memory allocation,
often not garbage-collectable, due to internal references.
|
hasService | boolean hasService(Class> serviceClass)(Code) | | Is the service currently available? *
|
releaseService | void releaseService(Object requestor, Class<T> serviceClass, T service)(Code) | | Release a service object previously requested by a call to getService.
Service object instances usually require significant non-GCable memory, so
must be released to reclaim the memory and/or the associated resources.
|
revokeService | void revokeService(Class> serviceClass, ServiceProvider serviceProvider)(Code) | | Remoke or remove an existing service *
|
|
|