Class WrapperComponentSelector
java.lang.Object
org.apache.avalon.framework.component.WrapperComponentSelector
- All Implemented Interfaces:
Component
,ComponentSelector
This is a
ServiceSelector
implementation that can wrap around a legacy
ComponentSelector
object effectively adapting a ComponentSelector
interface to a ServiceSelector
interface.- Since:
- 4.1.4
- Version:
- CVS $Revision: 1.11 $ $Date: 2004/02/11 14:34:25 $
- Author:
- Avalon Development Team
-
Constructor Summary
ConstructorsConstructorDescriptionWrapperComponentSelector
(String key, ServiceSelector selector) This constructor is a constructor for a WrapperComponentSelector. -
Method Summary
-
Constructor Details
-
WrapperComponentSelector
This constructor is a constructor for a WrapperComponentSelector.- Parameters:
key
- the key used to aquire this selectorselector
- the selector to wrap
-
-
Method Details
-
select
Select a Component based on a policy.- Specified by:
select
in interfaceComponentSelector
- Parameters:
policy
- the policy- Returns:
- the Component
- Throws:
ComponentException
- if unable to select service
-
hasComponent
Check to see if aComponent
exists relative to the supplied policy.- Specified by:
hasComponent
in interfaceComponentSelector
- Parameters:
policy
- aObject
containing the selection criteria- Returns:
- True if the component is available, False if it not.
-
release
Return theObject
when you are finished with it. This allows theServiceSelector
to handle the End-Of-Life Lifecycle events associated with theObject
. 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.- Specified by:
release
in interfaceComponentSelector
- Parameters:
object
- TheObject
we are releasing.
-