public class WrapperServiceManager extends java.lang.Object implements ServiceManager
ServiceManager
implementation that can wrap around a legacy
ComponentManager
object effectively adapting a ComponentManager
interface to a ServiceManager
interface.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.
|
public WrapperServiceManager(ComponentManager componentManager)
componentManager
- the ComponentManager instance that is being wrappedpublic java.lang.Object lookup(java.lang.String key) throws ServiceException
lookup
in interface ServiceManager
key
- the key to use to lookup componentServiceException
- if unable to provide the serviceServiceManager.lookup(java.lang.String)
public boolean hasService(java.lang.String key)
hasService
in interface ServiceManager
key
- the lookuppublic void release(java.lang.Object service)
release
in interface ServiceManager
service
- the service