Class WrapperServiceManager
- java.lang.Object
-
- org.apache.avalon.framework.service.WrapperServiceManager
-
- All Implemented Interfaces:
ServiceManager
public class WrapperServiceManager extends java.lang.Object implements ServiceManager
This is aServiceManager
implementation that can wrap around a legacyComponentManager
object effectively adapting aComponentManager
interface to aServiceManager
interface.- Version:
- CVS $Revision: 1.7 $ $Date: 2003/02/10 07:19:18 $
- Author:
- Avalon Development Team
-
-
Constructor Summary
Constructors Constructor Description WrapperServiceManager(ComponentManager componentManager)
This constructor is a constructor for a WrapperServiceManager.
-
Method Summary
All Methods Instance Methods Concrete Methods 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.
-
-
-
Constructor Detail
-
WrapperServiceManager
public WrapperServiceManager(ComponentManager componentManager)
This constructor is a constructor for a WrapperServiceManager.- Parameters:
componentManager
- the ComponentManager instance that is being wrapped
-
-
Method Detail
-
lookup
public java.lang.Object lookup(java.lang.String key) throws ServiceException
Retrieve a service using specified key.- Specified by:
lookup
in interfaceServiceManager
- Parameters:
key
- the key to use to lookup component- Returns:
- the matching service
- Throws:
ServiceException
- if unable to provide the service- See Also:
ServiceManager.lookup(java.lang.String)
-
hasService
public boolean hasService(java.lang.String key)
Return true if the component is available in ServiceManager.- Specified by:
hasService
in interfaceServiceManager
- Parameters:
key
- the lookup- Returns:
- true if the component is available in ServiceManager
-
release
public void release(java.lang.Object service)
Release the service back to the ServiceManager.- Specified by:
release
in interfaceServiceManager
- Parameters:
service
- the service
-
-