| org.cougaar.core.component.ExtendedServiceBroker
All known Subclasses: org.cougaar.core.component.AddonServiceBroker, org.cougaar.core.component.ServiceBrokerSupport, org.cougaar.core.component.ViewedServiceBroker, org.cougaar.core.component.DelegatingServiceBroker,
ExtendedServiceBroker | public interface ExtendedServiceBroker extends ServiceBroker(Code) | | A
ServiceBroker with extended methods to support the
ViewService .
Note: This is an infrastructure mechanism to support the
ViewService . Components should not expect their
ServiceBroker to implement this interface, or attempt to cast to
this interface! In future versions of the component model this
API will likely be refactored away and/or blocked from the
components.
This API extends the ServiceBroker "getService" to support:
- Hide services obtained by child components from their
container's view of obtained services, which would otherwise
happen due to propagating service brokers. This is accomplished
by setting the "recordInView" to false.
- Return not just the service result, but also the provider's
unique identifier and
ComponentDescription . This
allows the client's
ViewService monitor to record
which component advertised the obtained service instance.
- Pass the requestor's ComponentDescription to future
ServiceProviders, for both logging and better control than
relying on the client-provided "requestor" object.
|
Inner Class :final class ServiceResult | |
Method Summary | |
boolean | addService(Class serviceClass, ServiceProvider serviceProvider, int providerId, ComponentDescription providerDesc) | ServiceResult | getService(int requestorId, ComponentDescription requestorDesc, Object requestor, Class serviceClass, ServiceRevokedListener srl, boolean recordInView) | void | releaseService(int requestorId, ComponentDescription requestorDesc, Object requestor, Class serviceClass, Object service, boolean recordInView) | void | revokeService(Class serviceClass, ServiceProvider serviceProvider, int providerId, ComponentDescription providerDesc) |
|
|