Class WrapperServiceManager
- java.lang.Object
-
- org.apache.avalon.framework.service.WrapperServiceManager
-
- All Implemented Interfaces:
org.apache.avalon.framework.service.ServiceManager
public class WrapperServiceManager extends java.lang.Object implements org.apache.avalon.framework.service.ServiceManagerThis is aServiceManagerimplementation that can wrap around a legacyComponentManagerobject effectively adapting aComponentManagerinterface to aServiceManagerinterface.- 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
Fields Modifier and Type Field Description private org.apache.avalon.framework.component.ComponentManagerm_componentManagerThe component manager thaty this class wraps.
-
Constructor Summary
Constructors Constructor Description WrapperServiceManager(org.apache.avalon.framework.component.ComponentManager componentManager)This constructor is a constructor for a WrapperServiceManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasService(java.lang.String key)Return true if the component is available in ServiceManager.java.lang.Objectlookup(java.lang.String key)Retrieve a service using specified key.voidrelease(java.lang.Object service)Release the service back to the ServiceManager.
-
-
-
Method Detail
-
lookup
public java.lang.Object lookup(java.lang.String key) throws org.apache.avalon.framework.service.ServiceExceptionRetrieve a service using specified key.- Specified by:
lookupin 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:
ServiceManager.lookup(java.lang.String)
-
hasService
public boolean hasService(java.lang.String key)
Return true if the component is available in ServiceManager.- Specified by:
hasServicein interfaceorg.apache.avalon.framework.service.ServiceManager- 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:
releasein interfaceorg.apache.avalon.framework.service.ServiceManager- Parameters:
service- the service
-
-