|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider
protected class BeanContextServicesSupport.BCSSProxyServiceProvider
| Method Summary | |
|---|---|
Iterator |
getCurrentServiceSelectors(BeanContextServices bcs,
Class serviceClass)
Get a list of valid service selectors for the specified service class. |
Object |
getService(BeanContextServices bcs,
Object requestor,
Class serviceClass,
Object serviceSelector)
Get a service. |
void |
releaseService(BeanContextServices bcs,
Object requestor,
Object service)
Release the service. |
void |
serviceRevoked(BeanContextServiceRevokedEvent bcsre)
Called by BeanContextServices.revokeService() to indicate that a service has been revoked. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
Class serviceClass)
BeanContextServiceProviderBeanContextServices.getCurrentServiceSelectors().
If the specified service class does not have a finite number of
valid service selectors, it should return null.
If it takes a general Integer parameter, for
example, you may as well return null or the poor
soul who called this method will be iterating all day.
If it has no valid service selectors, it should still return an empty
Iterator.
getCurrentServiceSelectors in interface BeanContextServiceProviderbcs - the BeanContextServices that wants
to get the service selectors. Only weak references to this will
be retained, and it will never be changed, only queried
in a read-only manner.serviceClass - the service class to get selectors for.
null.BeanContextServices.getCurrentServiceSelectors(java.lang.Class)
public Object getService(BeanContextServices bcs,
Object requestor,
Class serviceClass,
Object serviceSelector)
BeanContextServiceProviderBeanContextServices.getService().
If the requested service class is not available, or if this
BeanContextServiceProvider chooses not honor the
request for some reason, then this method will return
null.
getService in interface BeanContextServiceProviderbcs - the BeanContextServices that wants
to get the service. Only weak references to this will
be retained, and it will never be changed, only queried
in a read-only manner.requestor - the actual requestor of the service. Only
weak references to this will be retained, and it will
never be changed, only queried in a read-only manner.serviceClass - the Class of the service being
requested.serviceSelector - a parameter to customize the service
returned with.
serviceClass (such that
instanceof serviceClass is true), or
null.BeanContextServices.getService(java.beans.beancontext.BeanContextChild,java.lang.Object,java.lang.Class,java.lang.Object,java.beans.beancontext.BeanContextServiceRevokedListener)
public void releaseService(BeanContextServices bcs,
Object requestor,
Object service)
BeanContextServiceProvider
Called by BeanContextServices.releaseService().
Most BeanContextServiceProviders won't have to do
anything here.
releaseService in interface BeanContextServiceProviderbcs - the BeanContextServices that wants
to release the service. Only weak references to this will
be retained, and it will never be changed, only queried
in a read-only manner.requestor - the original requestor of the service.service - the service to relinquishBeanContextServices.releaseService(java.beans.beancontext.BeanContextChild,java.lang.Object,java.lang.Object)public void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
BeanContextServiceRevokedListenerBeanContextServices.revokeService() to indicate that a service has been revoked.
If you have a reference to such a service, it should be
discarded and may no longer function properly.
getService() will no longer work on the specified
service class after this event has been fired.
serviceRevoked in interface BeanContextServiceRevokedListenerbcsre - the service revoked event.BeanContextServices.revokeService(java.lang.Class,java.beans.beancontext.BeanContextServiceProvider,boolean)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||