public class WrapperServiceManager
extends java.lang.Object
ServiceManager
implementation that can wrap around a legacy
ComponentManager
object effectively adapting a ComponentManager
interface to a ServiceManager
interface.Modifier and Type | Field and Description |
---|---|
private ComponentManager |
m_componentManager
The component manager thaty this class wraps.
|
Constructor and Description |
---|
WrapperServiceManager(ComponentManager componentManager)
This constructor is a constructor for a WrapperServiceManager.
|
Modifier and Type | Method and 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 ComponentManager m_componentManager
public WrapperServiceManager(ComponentManager componentManager)
componentManager
- the ComponentManager instance that is being wrappedpublic java.lang.Object lookup(java.lang.String key) throws ServiceException
key
- the key to use to lookup componentServiceException
- if unable to provide the serviceServiceManager#lookup
public boolean hasService(java.lang.String key)
key
- the lookuppublic void release(java.lang.Object service)
service
- the service