|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.component.WrapperComponentSelector
This is a ServiceSelector
implementation that can wrap around a legacy
ComponentSelector
object effectively adapting a ComponentSelector
interface to a ServiceSelector
interface.
Constructor Summary | |
WrapperComponentSelector(java.lang.String key,
ServiceSelector selector)
This constructor is a constructor for a WrapperComponentSelector. |
Method Summary | |
boolean |
hasComponent(java.lang.Object policy)
Check to see if a Component exists relative to the supplied policy. |
void |
release(Component object)
Return the Object when you are finished with it. |
Component |
select(java.lang.Object policy)
Select a Component 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 WrapperComponentSelector(java.lang.String key, ServiceSelector selector)
key
- the key used to aquire this selectorselector
- the selector to wrapMethod Detail |
public Component select(java.lang.Object policy) throws ComponentException
select
in interface ComponentSelector
policy
- the policy
ComponentException
- if unable to select servicepublic boolean hasComponent(java.lang.Object policy)
Component
exists relative to the supplied policy.
hasComponent
in interface ComponentSelector
policy
- a Object
containing the selection criteria
public void release(Component 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 ComponentSelector
object
- The Object
we are releasing.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |