org.apache.avalon.framework.component.ComponentManagerpublic class WrapperComponentManager
extends java.lang.Object
implements org.apache.avalon.framework.component.ComponentManager
ComponentManager implementation that can wrap around a
ServiceManager object effectively adapting a ServiceManager
interface to a ComponentManager interface.| Modifier and Type | Field | Description |
|---|---|---|
private org.apache.avalon.framework.service.ServiceManager |
m_manager |
The service manager we are adapting.
|
| Constructor | Description |
|---|---|
WrapperComponentManager(org.apache.avalon.framework.service.ServiceManager manager) |
Creation of a new wrapper component manger using a supplied
service manager as a source backing the wrapped.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
hasComponent(java.lang.String key) |
Check to see if a
Component exists for a key. |
org.apache.avalon.framework.component.Component |
lookup(java.lang.String key) |
Retrieve a component via a key.
|
void |
release(org.apache.avalon.framework.component.Component component) |
Return the
Component when you are finished with it. |
private final org.apache.avalon.framework.service.ServiceManager m_manager
public WrapperComponentManager(org.apache.avalon.framework.service.ServiceManager manager)
manager - the service manager backing the wrapper.public org.apache.avalon.framework.component.Component lookup(java.lang.String key)
throws org.apache.avalon.framework.component.ComponentException
lookup in interface org.apache.avalon.framework.component.ComponentManagerkey - the keyorg.apache.avalon.framework.component.ComponentException - if unable to aquire componentpublic boolean hasComponent(java.lang.String key)
Component exists for a key.hasComponent in interface org.apache.avalon.framework.component.ComponentManagerkey - a string identifying the key to check.public void release(org.apache.avalon.framework.component.Component component)
Component when you are finished with it. This
allows the ComponentManager to handle the End-Of-Life Lifecycle
events associated with the Component. Please note, that no Exceptions
should be thrown at this point. This is to allow easy use of the
ComponentManager system without having to trap Exceptions on a release.release in interface org.apache.avalon.framework.component.ComponentManagercomponent - The Component we are releasing.