Top Description Fields Constructors Methods
org.apache.avalon.framework.service

public Class WrapperServiceManager

extends Object
implements ServiceManager
Class Inheritance
All Implemented Interfaces
org.apache.avalon.framework.service.ServiceManager
Imports
org.apache.avalon.framework.component.Component, .ComponentException, .ComponentManager, .ComponentSelector

This is a ServiceManager implementation that can wrap around a legacy ComponentManager object effectively adapting a ComponentManager interface to a ServiceManager interface.
Author
Avalon Development Team
Since
4.1.4
Version
$Id: WrapperServiceManager.java 506231 2007-02-12 02:36:54Z crossley $

Field Summary

Modifier and TypeField and Description
private final ComponentManager
m_componentManager

The component manager thaty this class wraps.

Constructor Summary

AccessConstructor and Description
public
WrapperServiceManager(final ComponentManager
the ComponentManager instance that is being wrapped
componentManager
)

This constructor is a constructor for a WrapperServiceManager.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the component is available in ServiceManager
hasService
(final String
the lookup
key
)

Implements org.apache.avalon.framework.service.ServiceManager.hasService.

Return true if the component is available in ServiceManager.
public Object

Returns:

the matching service
lookup
(final String
the key to use to lookup component
key
)

Implements org.apache.avalon.framework.service.ServiceManager.lookup.

Retrieve a service using specified key.
public void
release(final Object
the service
service
)

Implements org.apache.avalon.framework.service.ServiceManager.release.

Release the service back to the ServiceManager.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

m_componentManagerback to summary
private final ComponentManager m_componentManager

The component manager thaty this class wraps.

Constructor Detail

WrapperServiceManagerback to summary
public WrapperServiceManager(final ComponentManager componentManager)

This constructor is a constructor for a WrapperServiceManager.

Parameters
componentManager:ComponentManager

the ComponentManager instance that is being wrapped

Method Detail

hasServiceback to summary
public boolean hasService(final String key)

Implements org.apache.avalon.framework.service.ServiceManager.hasService.

Return true if the component is available in ServiceManager.

Parameters
key:String

the lookup

Returns:boolean

true if the component is available in ServiceManager

lookupback to summary
public Object lookup(final String key) throws ServiceException

Implements org.apache.avalon.framework.service.ServiceManager.lookup.

Retrieve a service using specified key.

Parameters
key:String

the key to use to lookup component

Returns:Object

the matching service

Exceptions
ServiceException:
if unable to provide the service
See Also
ServiceManager#lookup
releaseback to summary
public void release(final Object service)

Implements org.apache.avalon.framework.service.ServiceManager.release.

Release the service back to the ServiceManager.

Parameters
service:Object

the service