Methods Summary |
---|
public void | addBeanContextServicesListener(java.beans.beancontext.BeanContextServicesListener bcsl)Adds a BeanContextServicesListener to this BeanContext
|
public boolean | addService(java.lang.Class serviceClass, java.beans.beancontext.BeanContextServiceProvider serviceProvider)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 .
|
public java.util.Iterator | getCurrentServiceClasses()Gets the currently available services for this context.
|
public java.util.Iterator | getCurrentServiceSelectors(java.lang.Class serviceClass)Gets the list of service dependent service parameters
(Service Selectors) for the specified service, by
calling getCurrentServiceSelectors() on the
underlying BeanContextServiceProvider.
|
public java.lang.Object | getService(java.beans.beancontext.BeanContextChild child, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector, java.beans.beancontext.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. When invoked, this method
gets the service by calling the getService() method on the
underlying BeanContextServiceProvider .
|
public boolean | hasService(java.lang.Class serviceClass)Reports whether or not a given service is
currently available from this context.
|
public void | releaseService(java.beans.beancontext.BeanContextChild child, java.lang.Object requestor, java.lang.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(java.beans.beancontext.BeanContextServicesListener bcsl)Removes a BeanContextServicesListener
from this BeanContext
|
public void | revokeService(java.lang.Class serviceClass, java.beans.beancontext.BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow)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 .
|