org.apache.cocoon.core.container
Class SingleComponentServiceManager

java.lang.Object
  extended byorg.apache.cocoon.core.container.SingleComponentServiceManager
All Implemented Interfaces:
Disposable, ServiceManager

public final class SingleComponentServiceManager
extends Object
implements ServiceManager, Disposable

This is a simple service manager implementation that just serves one single component.

Since:
2.2
Version:
$Id: SingleComponentServiceManager.java 312637 2005-10-10 13:00:42Z cziegeler $

Field Summary
protected  Object component
           
protected  ServiceManager parent
           
protected  String role
           
 
Constructor Summary
SingleComponentServiceManager(ServiceManager parent, Object component, String role)
           
 
Method Summary
 void dispose()
           
 boolean hasService(String key)
           
 Object lookup(String key)
           
 void release(Object component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected final ServiceManager parent

component

protected final Object component

role

protected final String role
Constructor Detail

SingleComponentServiceManager

public SingleComponentServiceManager(ServiceManager parent,
                                     Object component,
                                     String role)
Method Detail

hasService

public boolean hasService(String key)
Specified by:
hasService in interface ServiceManager
See Also:
ServiceManager.hasService(java.lang.String)

lookup

public Object lookup(String key)
              throws ServiceException
Specified by:
lookup in interface ServiceManager
Throws:
ServiceException
See Also:
ServiceManager.lookup(java.lang.String)

release

public void release(Object component)
Specified by:
release in interface ServiceManager
See Also:
ServiceManager.release(java.lang.Object)

dispose

public void dispose()
Specified by:
dispose in interface Disposable
See Also:
Disposable.dispose()


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.