org.apache.cocoon.portal.pluto.services.factory
Class FactoryManagerServiceImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.portal.pluto.services.factory.FactoryManagerServiceImpl
- All Implemented Interfaces:
- Disposable, Initializable, Contextualizable, LogEnabled, Serviceable, org.apache.pluto.services.ContainerService, org.apache.pluto.services.factory.FactoryManagerService
public class FactoryManagerServiceImpl
- extends AbstractLogEnabled
- implements org.apache.pluto.services.factory.FactoryManagerService, Initializable, Contextualizable, Serviceable, Disposable
Manages the life-time of factories registered during container startup.
A service has to derive from Factory
and implement the
init()
and destroy()
methods as appropriate.
TODO This is a very lazy implementation, we need to improve it
- Version:
- CVS $Id: FactoryManagerServiceImpl.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Carsten Ziegeler
- See Also:
Factory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
servletConfig
protected ServletConfig servletConfig
- The servlet configuration
context
protected Context context
- The avalon context
manager
protected ServiceManager manager
- The service manager
FactoryManagerServiceImpl
public FactoryManagerServiceImpl()
contextualize
public void contextualize(Context context)
throws ContextException
- Specified by:
contextualize
in interface Contextualizable
- Throws:
ContextException
service
public void service(ServiceManager manager)
throws ServiceException
- Specified by:
service
in interface Serviceable
- Throws:
ServiceException
initialize
public void initialize()
throws Exception
- Specified by:
initialize
in interface Initializable
- Throws:
Exception
dispose
public void dispose()
- Specified by:
dispose
in interface Disposable
getFactory
public org.apache.pluto.factory.Factory getFactory(Class theClass)
- Returns the service implementation for the given service class, or
null
if no such service is registered.
- Specified by:
getFactory
in interface org.apache.pluto.services.factory.FactoryManagerService
- Parameters:
theClass
- the service class
- Returns:
- the service implementation
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.