|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.component.WrapperComponentSelector
public class WrapperComponentSelector
This is a ServiceSelector implementation that can wrap around a legacy
ComponentSelector object effectively adapting a ComponentSelector
interface to a ServiceSelector interface.
| Field Summary | |
|---|---|
private java.lang.String |
m_key
The role that this selector was aquired via. |
private org.apache.avalon.framework.service.ServiceSelector |
m_selector
The Selector we are wrapping. |
| Constructor Summary | |
|---|---|
WrapperComponentSelector(java.lang.String key,
org.apache.avalon.framework.service.ServiceSelector selector)
This constructor is a constructor for a WrapperComponentSelector. |
|
| Method Summary | |
|---|---|
(package private) org.apache.avalon.framework.service.ServiceSelector |
getWrappedSelector()
The WrapperComponentManager wraps ServiceSelectors in
WrapperServiceSelectors when they are looked up. |
boolean |
hasComponent(java.lang.Object policy)
Check to see if a Component exists relative to the supplied policy. |
void |
release(org.apache.avalon.framework.component.Component object)
Return the Object when you are finished with it. |
org.apache.avalon.framework.component.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 |
| Field Detail |
|---|
private final org.apache.avalon.framework.service.ServiceSelector m_selector
private final java.lang.String m_key
| Constructor Detail |
|---|
public WrapperComponentSelector(java.lang.String key,
org.apache.avalon.framework.service.ServiceSelector selector)
key - the key used to aquire this selectorselector - the selector to wrap| Method Detail |
|---|
public org.apache.avalon.framework.component.Component select(java.lang.Object policy)
throws org.apache.avalon.framework.component.ComponentException
select in interface org.apache.avalon.framework.component.ComponentSelectorpolicy - the policy
ComponentException - if unable to select servicepublic boolean hasComponent(java.lang.Object policy)
Component exists relative to the supplied policy.
hasComponent in interface org.apache.avalon.framework.component.ComponentSelectorpolicy - a Object containing the selection criteria
public void release(org.apache.avalon.framework.component.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 org.apache.avalon.framework.component.ComponentSelectorobject - The Object we are releasing.org.apache.avalon.framework.service.ServiceSelector getWrappedSelector()
WrapperComponentManager wraps ServiceSelectors in
WrapperServiceSelectors when they are looked up. This method
makes it possible to release the original component selector.
ServiceSelector being wrapped.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||