|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.service.WrapperServiceSelector
This is a ServiceSelector
implementation that can wrap around a legacy
ComponentSelector
object effectively adapting a ComponentSelector
interface to a ServiceSelector
interface.
This class implements the Component
interface because it is used in
environments which expect all components to implement Component.
Constructor Summary | |
WrapperServiceSelector(java.lang.String key,
ComponentSelector selector)
This constructor is a constructor for a ComponentServiceManager |
Method Summary | |
boolean |
isSelectable(java.lang.Object policy)
Check to see if a Object exists relative to the supplied policy. |
void |
release(java.lang.Object object)
Return the Object when you are finished with it. |
java.lang.Object |
select(java.lang.Object policy)
Select a service based on a policy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WrapperServiceSelector(java.lang.String key, ComponentSelector selector)
key
- the key used to aquire this selectorselector
- the selector to wrapMethod Detail |
public java.lang.Object select(java.lang.Object policy) throws ServiceException
select
in interface ServiceSelector
policy
- the policy
ServiceException
- if unable to select servicepublic boolean isSelectable(java.lang.Object policy)
Object
exists relative to the supplied policy.
isSelectable
in interface ServiceSelector
policy
- a Object
containing the selection criteria
public void release(java.lang.Object object)
Object
when you are finished with it. This
allows the ServiceSelector
to handle the End-Of-Life Lifecycle
events associated with the Object
. Please note, that no
Exception should be thrown at this point. This is to allow easy use of the
ServiceSelector system without having to trap Exceptions on a release.
release
in interface ServiceSelector
object
- The Object
we are releasing.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |