org.apache.avalon.excalibur.component
Class ThreadSafeComponentHandler
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.avalon.excalibur.component.ComponentHandler
|
+--org.apache.avalon.excalibur.component.ThreadSafeComponentHandler
- All Implemented Interfaces:
- Disposable, Initializable, Loggable
- public class ThreadSafeComponentHandler
- extends ComponentHandler
The ThreadSafeComponentHandler to make sure components are initialized
and destroyed correctly.
- Version:
- CVS $Revision: 1.2 $ $Date: 2001/06/01 21:09:20 $
- Author:
- Berin Loritsch
Method Summary |
void |
dispose()
Dispose of the ComponentHandler and any associated Pools and Factories. |
Component |
get()
Get a reference of the desired Component |
void |
initialize()
Initialize the ComponentHandler. |
void |
put(Component component)
Return a reference of the desired Component |
void |
setLogger(org.apache.log.Logger log)
Set the components logger. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadSafeComponentHandler
protected ThreadSafeComponentHandler(java.lang.Class componentClass,
Configuration config,
ComponentManager manager,
Context context,
RoleManager roles)
throws java.lang.Exception
- Create a ComponentHandler that takes care of hiding the details of
whether a Component is ThreadSafe, Poolable, or SingleThreaded.
It falls back to SingleThreaded if not specified.
ThreadSafeComponentHandler
protected ThreadSafeComponentHandler(Component component)
throws java.lang.Exception
- Create a ComponentHandler that takes care of hiding the details of
whether a Component is ThreadSafe, Poolable, or SingleThreaded.
It falls back to SingleThreaded if not specified.
setLogger
public void setLogger(org.apache.log.Logger log)
- Description copied from class:
AbstractLoggable
- Set the components logger.
- Overrides:
setLogger
in class AbstractLoggable
- Following copied from class:
org.apache.avalon.framework.logger.AbstractLoggable
- Parameters:
logger
- the logger
initialize
public void initialize()
throws java.lang.Exception
- Initialize the ComponentHandler.
- Following copied from interface:
org.apache.avalon.framework.activity.Initializable
- Throws:
java.lang.Exception
- if an error occurs
get
public final Component get()
throws java.lang.Exception
- Get a reference of the desired Component
- Overrides:
get
in class ComponentHandler
put
public void put(Component component)
- Return a reference of the desired Component
- Overrides:
put
in class ComponentHandler
dispose
public void dispose()
- Dispose of the ComponentHandler and any associated Pools and Factories.
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.