org.apache.avalon.framework.service.ServiceManagerpublic class WrapperServiceManager
extends java.lang.Object
implements org.apache.avalon.framework.service.ServiceManager
ServiceManager implementation that can wrap around a legacy
ComponentManager object effectively adapting a ComponentManager
interface to a ServiceManager interface.| Modifier and Type | Field | Description |
|---|---|---|
private org.apache.avalon.framework.component.ComponentManager |
m_componentManager |
The component manager thaty this class wraps.
|
| Constructor | Description |
|---|---|
WrapperServiceManager(org.apache.avalon.framework.component.ComponentManager componentManager) |
This constructor is a constructor for a WrapperServiceManager.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
hasService(java.lang.String key) |
Return true if the component is available in ServiceManager.
|
java.lang.Object |
lookup(java.lang.String key) |
Retrieve a service using specified key.
|
void |
release(java.lang.Object service) |
Release the service back to the ServiceManager.
|
private final org.apache.avalon.framework.component.ComponentManager m_componentManager
public WrapperServiceManager(org.apache.avalon.framework.component.ComponentManager componentManager)
componentManager - the ComponentManager instance that is being wrappedpublic java.lang.Object lookup(java.lang.String key)
throws org.apache.avalon.framework.service.ServiceException
lookup in interface org.apache.avalon.framework.service.ServiceManagerkey - the key to use to lookup componentorg.apache.avalon.framework.service.ServiceException - if unable to provide the serviceServiceManager.lookup(java.lang.String)public boolean hasService(java.lang.String key)
hasService in interface org.apache.avalon.framework.service.ServiceManagerkey - the lookuppublic void release(java.lang.Object service)
release in interface org.apache.avalon.framework.service.ServiceManagerservice - the service