org.apache.avalon.fortress.impl.handler
Class PerThreadComponentHandler
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLogEnabled
|
+--org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
|
+--org.apache.avalon.fortress.impl.handler.AbstractComponentHandler
|
+--org.apache.avalon.fortress.impl.handler.PerThreadComponentHandler
- All Implemented Interfaces:
- ComponentHandler, Disposable, Initializable, Instrumentable, LogEnabled, Serviceable
- public final class PerThreadComponentHandler
- extends AbstractComponentHandler
The ThreadSafeComponentHandler to make sure components are initialized
and destroyed correctly.
- Since:
- 4.0
- Version:
- CVS $Revision: 1.6 $ $Date: 2003/04/18 20:02:29 $
- Author:
- Avalon Development Team
Method Summary |
protected void |
doDispose()
Dispose handler specific resources. |
protected Object |
doGet()
Get a reference of the desired Component |
void |
initialize()
|
Methods inherited from class org.apache.avalon.fortress.impl.handler.AbstractComponentHandler |
dispose, disposeComponent, doPrepare, doPut, get, getComponentClass, newComponent, prepareHandler, put, service, toString |
PerThreadComponentHandler
public PerThreadComponentHandler()
initialize
public void initialize()
throws Exception
- Specified by:
initialize
in interface Initializable
- Overrides:
initialize
in class AbstractComponentHandler
Exception
doGet
protected Object doGet()
throws Exception
- Get a reference of the desired Component
- Specified by:
doGet
in class AbstractComponentHandler
- Returns:
- the service
- Throws:
Exception
- if unable to aquire service
doDispose
protected void doDispose()
- Description copied from class:
AbstractComponentHandler
- Dispose handler specific resources.
Subclasses should overide this to provide their own funcitonality.
- Overrides:
doDispose
in class AbstractComponentHandler
Copyright © 2000-2002 Apache Avalon Project. All Rights Reserved.