org.apache.avalon.framework.service
Class WrapperServiceSelector
java.lang.Object
org.apache.avalon.framework.service.WrapperServiceSelector
- ServiceSelector
public class WrapperServiceSelector
extends java.lang.Object
Version:
- Avalon Development Team
boolean | isSelectable(Object policy) - Check to see if a
Object exists relative to the supplied policy.
|
void | release(Object object) - Return the
Object when you are finished with it.
|
Object | select(Object policy) - Select a service based on a policy.
|
WrapperServiceSelector
public WrapperServiceSelector(String key,
ComponentSelector selector)
This constructor is a constructor for a ComponentServiceManager
key
- the key used to aquire this selectorselector
- the selector to wrap
isSelectable
public boolean isSelectable(Object policy)
Check to see if a Object
exists relative to the supplied policy.
- isSelectable in interface ServiceSelector
policy
- a Object
containing the selection criteria
- True if the component is available, False if it not.
release
public void release(Object object)
Return the
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.
"Copyright B) 2001 Apache Jakarta Project. All Rights Reserved."