org.apache.cocoon.core.container.handler
Class SingleThreadedComponentHandler
java.lang.Object
org.apache.cocoon.core.container.handler.AbstractComponentHandler
org.apache.cocoon.core.container.handler.AbstractFactoryHandler
org.apache.cocoon.core.container.handler.SingleThreadedComponentHandler
- All Implemented Interfaces:
- ComponentHandler
- public class SingleThreadedComponentHandler
- extends AbstractFactoryHandler
The DefaultComponentHandler to make sure components are initialized
and destroyed correctly.
- Since:
- 2.2
- Version:
- $Id: SingleThreadedComponentHandler.java 312637 2005-10-10 13:00:42Z cziegeler $
Method Summary |
protected Object |
doGet()
Get a reference of the desired Component |
protected void |
doInitialize()
|
protected void |
doPut(Object component)
Return a reference of the desired Component |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleThreadedComponentHandler
public SingleThreadedComponentHandler(ComponentInfo info,
Logger logger,
ComponentFactory factory)
- Create a SingleThreadedComponentHandler which manages a pool of Components
created by the specified factory object.
- Parameters:
logger
- The logger to usefactory
- The factory object which is responsible for creating the components
managed by the handler.
doGet
protected Object doGet()
throws Exception
- Get a reference of the desired Component
- Specified by:
doGet
in class AbstractComponentHandler
- Returns:
- A component instance.
- Throws:
Exception
- If there are any problems encountered acquiring a
component instance.
doPut
protected void doPut(Object component)
- Return a reference of the desired Component
- Specified by:
doPut
in class AbstractComponentHandler
- Parameters:
component
- Component to be be put/released back to the handler.
doInitialize
protected void doInitialize()
- Specified by:
doInitialize
in class AbstractComponentHandler
Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.