public class DefaultComponentHandler extends ComponentHandler
| Modifier and Type | Field and Description |
|---|---|
private boolean |
m_disposed
Deprecated.
State management boolean stating whether the Handler is disposed or not
|
private DefaultComponentFactory |
m_factory
Deprecated.
The instance of the ComponentFactory that creates and disposes of the Component
|
private boolean |
m_initialized
Deprecated.
State management boolean stating whether the Handler is initialized or not
|
| Modifier | Constructor and Description |
|---|---|
|
DefaultComponentHandler(DefaultComponentFactory factory,
org.apache.avalon.framework.configuration.Configuration config)
Deprecated.
Create a DefaultComponentHandler which manages a pool of Components
created by the specified factory object.
|
protected |
DefaultComponentHandler(java.lang.String role,
java.lang.Class componentClass,
org.apache.avalon.framework.configuration.Configuration config,
org.apache.avalon.framework.component.ComponentManager manager,
org.apache.avalon.framework.context.Context context,
RoleManager roles,
LogkitLoggerManager logkit)
Deprecated.
Create a ComponentHandler that takes care of hiding the details of
whether a Component is ThreadSafe, Poolable, or SingleThreaded.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Deprecated.
Dispose of the ComponentHandler and any associated Pools and Factories.
|
protected org.apache.avalon.framework.component.Component |
doGet()
Deprecated.
Get a reference of the desired Component
|
protected void |
doPut(org.apache.avalon.framework.component.Component component)
Deprecated.
Return a reference of the desired Component
|
void |
initialize()
Deprecated.
Initialize the ComponentHandler.
|
canBeDisposed, get, getComponentHandler, getComponentHandler, getComponentHandler, getComponentHandler, getComponentHandler, putaddChildInstrumentable, addInstrument, getChildInstrumentables, getInstrumentableName, getInstruments, setInstrumentableNamegetLogkitLogger, setLoggerprivate final DefaultComponentFactory m_factory
private boolean m_initialized
private boolean m_disposed
protected DefaultComponentHandler(java.lang.String role,
java.lang.Class componentClass,
org.apache.avalon.framework.configuration.Configuration config,
org.apache.avalon.framework.component.ComponentManager manager,
org.apache.avalon.framework.context.Context context,
RoleManager roles,
LogkitLoggerManager logkit)
throws java.lang.Exception
componentClass - Class of the component of the handler being
created.config - The configuration for the component.manager - The ComponentManager which will be managing the
Component.context - The current context.roles - The current RoleManager.logkit - The current LogKitLoggerManager.java.lang.Exception - If there are any problems creating the handler.public DefaultComponentHandler(DefaultComponentFactory factory, org.apache.avalon.framework.configuration.Configuration config) throws java.lang.Exception
factory - The factory object which is responsible for creating the components
managed by the ComponentHandler.config - The configuration to use to configure the pool.java.lang.Exception - If there are any problems creating the handler.public void initialize()
protected org.apache.avalon.framework.component.Component doGet()
throws java.lang.Exception
doGet in class ComponentHandlerjava.lang.Exception - If there are any problems encountered acquiring a
component instance.protected void doPut(org.apache.avalon.framework.component.Component component)
doPut in class ComponentHandlercomponent - Component to be be put/released back to the handler.public void dispose()