| java.lang.Object org.apache.beehive.controls.runtime.webcontext.ControlBeanContextChildSupport org.apache.beehive.controls.runtime.webcontext.ControlBeanContextSupport org.apache.beehive.controls.runtime.webcontext.ControlBeanContextServicesSupport
Method Summary | |
public void | addBeanContextServicesListener(BeanContextServicesListener bcsl) Adds a BeanContextServicesListener to this BeanContext. | public boolean | addService(Class serviceClass, BeanContextServiceProvider serviceProvider) Adds a service to this BeanContext. | public Iterator | getCurrentServiceClasses() Gets the currently available services for this context. | public Iterator | getCurrentServiceSelectors(Class serviceClass) Gets the list of service dependent service parameters
(Service Selectors) for the specified service, by
calling getCurrentServiceSelectors() on the
underlying BeanContextServiceProvider. | public Object | getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) A BeanContextChild , or any arbitrary object
associated with a BeanContextChild , may obtain
a reference to a currently registered service from its
nesting BeanContextServices
via invocation of this method. | public synchronized boolean | hasService(Class serviceClass) Reports whether or not a given service is
currently available from this context. | protected void | initialize() Initialize data structures. | protected synchronized void | releaseBeanContextResources() Invoked when all resources obtained from the current nested bean context
need to be released. | public void | releaseService(BeanContextChild child, Object requestor, Object service) Releases a BeanContextChild 's
(or any arbitrary object associated with a BeanContextChild)
reference to the specified service by calling releaseService()
on the underlying BeanContextServiceProvider . | public void | removeBeanContextServicesListener(BeanContextServicesListener bcsl) Removes a BeanContextServicesListener
from this BeanContext . | public void | revokeService(Class serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow) BeanContextServiceProviders wishing to remove
a currently registered service from this context
may do so via invocation of this method. |
ControlBeanContextServicesSupport | public ControlBeanContextServicesSupport()(Code) | | Constructor.
|
ControlBeanContextServicesSupport | public ControlBeanContextServicesSupport(BeanContextServices peer)(Code) | | Constructor which allows delegate to be passed in.
Parameters: peer - BeanContextServices peer. |
addBeanContextServicesListener | public void addBeanContextServicesListener(BeanContextServicesListener bcsl)(Code) | | Adds a BeanContextServicesListener to this BeanContext.
Parameters: bcsl - the BeanContextServicesListener to add |
addService | public boolean addService(Class serviceClass, BeanContextServiceProvider serviceProvider)(Code) | | Adds a service to this BeanContext.
BeanContextServiceProvider s call this method
to register a particular service with this context.
If the service has not previously been added, the
BeanContextServices associates
the service with the BeanContextServiceProvider and
fires a BeanContextServiceAvailableEvent to all
currently registered BeanContextServicesListeners .
The method then returns true , indicating that
the addition of the service was successful.
If the given service has already been added, this method
simply returns false .
Parameters: serviceClass - the service to add Parameters: serviceProvider - the BeanContextServiceProvider associated with the service true if service was added. |
getCurrentServiceClasses | public Iterator getCurrentServiceClasses()(Code) | | Gets the currently available services for this context.
an Iterator consisting of thecurrently available services |
getCurrentServiceSelectors | public Iterator getCurrentServiceSelectors(Class serviceClass)(Code) | | Gets the list of service dependent service parameters
(Service Selectors) for the specified service, by
calling getCurrentServiceSelectors() on the
underlying BeanContextServiceProvider.
Parameters: serviceClass - the specified service the currently available service selectorsfor the named serviceClass |
getService | public Object getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException(Code) | | A BeanContextChild , or any arbitrary object
associated with a BeanContextChild , may obtain
a reference to a currently registered service from its
nesting BeanContextServices
via invocation of this method. When invoked, this method
gets the service by calling the getService() method on the
underlying BeanContextServiceProvider .
Parameters: child - the BeanContextChild associated with this request Parameters: requestor - the object requesting the service Parameters: serviceClass - class of the requested service Parameters: serviceSelector - the service dependent parameter Parameters: bcsrl - theBeanContextServiceRevokedListener to notifyif the service should later become revoked a reference to this context's namedService as requested or null throws: java.util.TooManyListenersException - |
hasService | public synchronized boolean hasService(Class serviceClass)(Code) | | Reports whether or not a given service is
currently available from this context.
Parameters: serviceClass - the service in question true if the service is available |
initialize | protected void initialize()(Code) | | Initialize data structures.
|
releaseBeanContextResources | protected synchronized void releaseBeanContextResources()(Code) | | Invoked when all resources obtained from the current nested bean context
need to be released. For BeanContextServices this means revoke any services
obtained from a delegate services provider. Typically invoked when the parent
context is changed.
|
releaseService | public void releaseService(BeanContextChild child, Object requestor, Object service)(Code) | | Releases a BeanContextChild 's
(or any arbitrary object associated with a BeanContextChild)
reference to the specified service by calling releaseService()
on the underlying BeanContextServiceProvider .
Parameters: child - the BeanContextChild Parameters: requestor - the requestor Parameters: service - the service |
removeBeanContextServicesListener | public void removeBeanContextServicesListener(BeanContextServicesListener bcsl)(Code) | | Removes a BeanContextServicesListener
from this BeanContext .
Parameters: bcsl - the BeanContextServicesListener to remove from this context |
revokeService | public void revokeService(Class serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow)(Code) | | BeanContextServiceProviders wishing to remove
a currently registered service from this context
may do so via invocation of this method. Upon revocation of
the service, the BeanContextServices fires a
BeanContextServiceRevokedEvent to its
list of currently registered
BeanContextServiceRevokedListeners and
BeanContextServicesListeners .
Parameters: serviceClass - the service to revoke from this BeanContextServices Parameters: serviceProvider - the BeanContextServiceProvider associated withthis particular service that is being revoked Parameters: revokeCurrentServicesNow - a value of true indicates an exceptional circumstance where theBeanContextServiceProvider orBeanContextServices wishes to immediatelyterminate service to all currently outstanding referencesto the specified service. |
|
|