public class WrapperServiceManager extends 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(String key)
Return true if the component is available in ServiceManager.
|
Object |
lookup(String key)
Retrieve a service using specified key.
|
void |
release(Object service)
Release the service back to the ServiceManager.
|
public WrapperServiceManager(ComponentManager componentManager)
componentManager
- the ComponentManager instance that is being wrappedpublic Object lookup(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(String key)
hasService
in interface ServiceManager
key
- the lookuppublic void release(Object service)
release
in interface ServiceManager
service
- the serviceCopyright © 2019. All rights reserved.