Class WrapperServiceManager
java.lang.Object
org.apache.avalon.framework.service.WrapperServiceManager
- All Implemented Interfaces:
org.apache.avalon.framework.service.ServiceManager
public class WrapperServiceManager
extends Object
implements org.apache.avalon.framework.service.ServiceManager
This is a
ServiceManager
implementation that can wrap around a legacy
ComponentManager
object effectively adapting a ComponentManager
interface to a ServiceManager
interface.- Since:
- 4.1.4
- Version:
- $Id: WrapperServiceManager.java 30977 2004-07-30 03:57:54 -0500 (Fri, 30 Jul 2004) niclas $
- Author:
- Avalon Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.avalon.framework.component.ComponentManager
The component manager thaty this class wraps. -
Constructor Summary
ConstructorsConstructorDescriptionWrapperServiceManager
(org.apache.avalon.framework.component.ComponentManager componentManager) This constructor is a constructor for a WrapperServiceManager. -
Method Summary
-
Field Details
-
m_componentManager
private final org.apache.avalon.framework.component.ComponentManager m_componentManagerThe component manager thaty this class wraps.
-
-
Constructor Details
-
WrapperServiceManager
public WrapperServiceManager(org.apache.avalon.framework.component.ComponentManager componentManager) This constructor is a constructor for a WrapperServiceManager.- Parameters:
componentManager
- the ComponentManager instance that is being wrapped
-
-
Method Details
-
lookup
Retrieve a service using specified key.- Specified by:
lookup
in interfaceorg.apache.avalon.framework.service.ServiceManager
- Parameters:
key
- the key to use to lookup component- Returns:
- the matching service
- Throws:
org.apache.avalon.framework.service.ServiceException
- if unable to provide the service- See Also:
-
hasService
Return true if the component is available in ServiceManager.- Specified by:
hasService
in interfaceorg.apache.avalon.framework.service.ServiceManager
- Parameters:
key
- the lookup- Returns:
- true if the component is available in ServiceManager
-
release
Release the service back to the ServiceManager.- Specified by:
release
in interfaceorg.apache.avalon.framework.service.ServiceManager
- Parameters:
service
- the service
-