| java.lang.Object org.cougaar.core.component.ServiceBrokerSupport org.cougaar.core.component.PropagatingServiceBroker
PropagatingServiceBroker | public class PropagatingServiceBroker extends ServiceBrokerSupport (Code) | | A service broker which implements not just a local SB, but also
a pass-through to another (presumably higher-level) SB.
|
Method Summary | |
protected void | connectToDelegate(ServiceBroker d) | protected void | destroy() Disconnect this propagating service broker from its parent.
This method removes the revokation listeners, which allows
the broker to be garbage-collected.
The expected usage is for the Container to have a private
static inner-class that is a subclass of this class. | protected void | disconnectFromDelegate(ServiceBroker d) | public Iterator | getCurrentServiceClasses() gets the currently available services for this context. | protected ServiceBroker | getDelegate() | public ServiceResult | getService(int requestorId, ComponentDescription requestorDesc, Object requestor, Class serviceClass, ServiceRevokedListener srl, boolean recordInView) get an instance of the requested service from a service provider associated
with this context. | public boolean | hasService(Class serviceClass) | public void | releaseService(int requestorId, ComponentDescription requestorDesc, Object requestor, Class serviceClass, Object service, boolean recordInView) | public void | revokeService(Class serviceClass, ServiceProvider serviceProvider) |
destroy | protected void destroy()(Code) | | Disconnect this propagating service broker from its parent.
This method removes the revokation listeners, which allows
the broker to be garbage-collected.
The expected usage is for the Container to have a private
static inner-class that is a subclass of this class. The
subclass should has an added method, "void myDestroy()",
which simply calls "destroy()":
private static class MyPropSB
extends PropagatingServiceBroker {
public MyPropSB(BindingSite sb) { super(sb); }
private void myDestroy() { super.destroy(); }
}
This allows the container to call "myDestroy()" during its
"unload()", but still hide this method from the child
components (due to the private class access).
|
getCurrentServiceClasses | public Iterator getCurrentServiceClasses()(Code) | | gets the currently available services for this context.
This version copies the keyset to keep the iterator safe, so don't be doing this
too often.
|
hasService | public boolean hasService(Class serviceClass)(Code) | | is the service currently available in this broker or in the Delegate? *
|
Fields inherited from org.cougaar.core.component.ServiceBrokerSupport | final protected Object servicesLock(Code)(Java Doc)
|
Methods inherited from org.cougaar.core.component.ServiceBrokerSupport | public boolean addService(Class serviceClass, ServiceProvider serviceProvider)(Code)(Java Doc) public boolean addService(Class serviceClass, ServiceProvider serviceProvider, int providerId, ComponentDescription providerDesc)(Code)(Java Doc) public void addServiceListener(ServiceListener sl)(Code)(Java Doc) protected void applyListener(ServiceListener sl, ServiceEvent se)(Code)(Java Doc) protected void applyListeners(ServiceEvent se)(Code)(Java Doc) public Iterator getCurrentServiceClasses()(Code)(Java Doc) public T getService(Object requestor, Class<T> serviceClass, ServiceRevokedListener srl)(Code)(Java Doc) public ServiceResult getService(int requestorId, ComponentDescription requestorDesc, Object requestor, Class serviceClass, ServiceRevokedListener srl, boolean recordInView)(Code)(Java Doc) protected ServiceResult getServiceAllowNull(int requestorId, ComponentDescription requestorDesc, Object requestor, Class serviceClass, ServiceRevokedListener srl, boolean recordInView)(Code)(Java Doc) public boolean hasService(Class serviceClass)(Code)(Java Doc) public void releaseService(Object requestor, Class serviceClass, Object service)(Code)(Java Doc) public void releaseService(int requestorId, ComponentDescription requestorDesc, Object requestor, Class serviceClass, Object service, boolean recordInView)(Code)(Java Doc) public void removeServiceListener(ServiceListener sl)(Code)(Java Doc) public void revokeService(Class serviceClass, ServiceProvider serviceProvider)(Code)(Java Doc) public void revokeService(Class serviceClass, ServiceProvider serviceProvider, int providerId, ComponentDescription providerDesc)(Code)(Java Doc)
|
|
|