public class WrapperComponentSelector extends Object implements ComponentSelector
ServiceSelector implementation that can wrap around a legacy
ComponentSelector object effectively adapting a ComponentSelector
interface to a ServiceSelector interface.| Constructor and Description |
|---|
WrapperComponentSelector(String key,
ServiceSelector selector)
This constructor is a constructor for a WrapperComponentSelector.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasComponent(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(Object policy)
Select a Component based on a policy.
|
public WrapperComponentSelector(String key, ServiceSelector selector)
key - the key used to aquire this selectorselector - the selector to wrappublic Component select(Object policy) throws ComponentException
select in interface ComponentSelectorpolicy - the policyComponentException - if unable to select servicepublic boolean hasComponent(Object policy)
Component exists relative to the supplied policy.hasComponent in interface ComponentSelectorpolicy - a Object containing the selection criteriapublic 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 ComponentSelectorobject - The Object we are releasing.Copyright © 2021. All rights reserved.