public abstract class ComponentHandler extends AbstractDualLogEnabledInstrumentable implements org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Disposable
| Modifier and Type | Field and Description |
|---|---|
private org.apache.excalibur.instrument.CounterInstrument |
m_getsInstrument
Deprecated.
Instrument used to profile the number of gets.
|
private org.apache.excalibur.instrument.CounterInstrument |
m_putsInstrument
Deprecated.
Instrument used to profile the number of puts.
|
private int |
m_references
Deprecated.
|
private java.lang.Object |
m_referenceSemaphore
Deprecated.
|
private org.apache.excalibur.instrument.ValueInstrument |
m_referencesInstrument
Deprecated.
Instrument used to profile the number of outstanding references.
|
| Constructor and Description |
|---|
ComponentHandler()
Deprecated.
Creates a new ComponentHandler.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeDisposed()
Deprecated.
Returns
true if this component handler can safely be
disposed (i.e. |
protected org.apache.avalon.framework.component.Component |
doGet()
Deprecated.
Concrete implementation of getting a component.
|
protected void |
doPut(org.apache.avalon.framework.component.Component component)
Deprecated.
Concrete implementation of putting back a component.
|
org.apache.avalon.framework.component.Component |
get()
Deprecated.
Get an instance of the type of component handled by this handler.
|
static ComponentHandler |
getComponentHandler(java.lang.Class componentClass,
org.apache.avalon.framework.configuration.Configuration configuration,
org.apache.avalon.framework.component.ComponentManager componentManager,
org.apache.avalon.framework.context.Context context,
RoleManager roleManager,
LogkitLoggerManager loggerManager)
Deprecated.
This method has been deprecated in favor of the version below which
handles instrumentation.
|
static ComponentHandler |
getComponentHandler(java.lang.Class componentClass,
org.apache.avalon.framework.configuration.Configuration configuration,
org.apache.avalon.framework.component.ComponentManager componentManager,
org.apache.avalon.framework.context.Context context,
RoleManager roleManager,
LogkitLoggerManager loggerManager,
org.apache.excalibur.instrument.InstrumentManager instrumentManager,
java.lang.String instrumentableName)
Deprecated.
Looks up and returns a component handler for a given component class.
|
static ComponentHandler |
getComponentHandler(org.apache.avalon.framework.component.Component componentInstance)
Deprecated.
|
static ComponentHandler |
getComponentHandler(java.lang.String role,
java.lang.Class componentClass,
org.apache.avalon.framework.configuration.Configuration configuration,
org.apache.avalon.framework.component.ComponentManager componentManager,
org.apache.avalon.framework.context.Context context,
RoleManager roleManager,
LogkitLoggerManager loggerManager)
Deprecated.
This method has been deprecated in favor of the version below which
handles instrumentation.
|
static ComponentHandler |
getComponentHandler(java.lang.String role,
java.lang.Class componentClass,
org.apache.avalon.framework.configuration.Configuration configuration,
org.apache.avalon.framework.component.ComponentManager componentManager,
org.apache.avalon.framework.context.Context context,
RoleManager roleManager,
LogkitLoggerManager loggerManager,
org.apache.excalibur.instrument.InstrumentManager instrumentManager,
java.lang.String instrumentableName)
Deprecated.
Looks up and returns a component handler for a given component class.
|
void |
put(org.apache.avalon.framework.component.Component component)
Deprecated.
Put back an instance of the type of component handled by this handler.
|
addChildInstrumentable, addInstrument, getChildInstrumentables, getInstrumentableName, getInstruments, setInstrumentableNamegetLogkitLogger, setLoggerenableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate java.lang.Object m_referenceSemaphore
private int m_references
private org.apache.excalibur.instrument.ValueInstrument m_referencesInstrument
private org.apache.excalibur.instrument.CounterInstrument m_getsInstrument
private org.apache.excalibur.instrument.CounterInstrument m_putsInstrument
public ComponentHandler()
public static ComponentHandler getComponentHandler(java.lang.Class componentClass, org.apache.avalon.framework.configuration.Configuration configuration, org.apache.avalon.framework.component.ComponentManager componentManager, org.apache.avalon.framework.context.Context context, RoleManager roleManager, LogkitLoggerManager loggerManager) throws java.lang.Exception
componentClass - Class of the component for which the handle is
being requested.configuration - The configuration for this component.componentManager - The ComponentLocator which will be managing
the Component.context - The current context object.roleManager - The current RoleManager.loggerManager - The current LogKitLoggerManager.java.lang.Exception - If there were any problems obtaining a ComponentHandlerpublic static ComponentHandler getComponentHandler(java.lang.Class componentClass, org.apache.avalon.framework.configuration.Configuration configuration, org.apache.avalon.framework.component.ComponentManager componentManager, org.apache.avalon.framework.context.Context context, RoleManager roleManager, LogkitLoggerManager loggerManager, org.apache.excalibur.instrument.InstrumentManager instrumentManager, java.lang.String instrumentableName) throws java.lang.Exception
componentClass - Class of the component for which the handle is
being requested.configuration - The configuration for this component.componentManager - The ComponentLocator which will be managing
the Component.context - The current context object.roleManager - The current RoleManager.loggerManager - The current LogKitLoggerManager.instrumentManager - The current InstrumentManager (May be null).instrumentableName - The instrumentable name to assign to
components created by the handler.java.lang.Exception - If there were any problems obtaining a ComponentHandlerpublic static ComponentHandler getComponentHandler(java.lang.String role, java.lang.Class componentClass, org.apache.avalon.framework.configuration.Configuration configuration, org.apache.avalon.framework.component.ComponentManager componentManager, org.apache.avalon.framework.context.Context context, RoleManager roleManager, LogkitLoggerManager loggerManager) throws java.lang.Exception
role - The role name of the component. This must be
a fully-qualified classname.componentClass - Class of the component for which the handle is
being requested.configuration - The configuration for this component.componentManager - The ComponentLocator which will be managing
the Component.context - The current context object.roleManager - The current RoleManager.loggerManager - The current LogKitLoggerManager.java.lang.Exception - If there were any problems obtaining a ComponentHandlerpublic static ComponentHandler getComponentHandler(java.lang.String role, java.lang.Class componentClass, org.apache.avalon.framework.configuration.Configuration configuration, org.apache.avalon.framework.component.ComponentManager componentManager, org.apache.avalon.framework.context.Context context, RoleManager roleManager, LogkitLoggerManager loggerManager, org.apache.excalibur.instrument.InstrumentManager instrumentManager, java.lang.String instrumentableName) throws java.lang.Exception
role - The role name of the component. This must be
a fully-qualified classnamecomponentClass - Class of the component for which the handle is
being requested.configuration - The configuration for this component.componentManager - The ComponentLocator which will be managing
the Component.context - The current context object.roleManager - The current RoleManager.loggerManager - The current LogKitLoggerManager.instrumentManager - The current InstrumentManager (May be null).instrumentableName - The instrumentable name to assign to
components created by the handler.java.lang.Exception - If there were any problems obtaining a ComponentHandlerpublic static ComponentHandler getComponentHandler(org.apache.avalon.framework.component.Component componentInstance) throws java.lang.Exception
java.lang.Exceptionpublic org.apache.avalon.framework.component.Component get()
throws java.lang.Exception
Subclasses should not extend this method but rather the doGet method below otherwise reference counts will not be supported.
This method is not final to make the class backwards compatible.
Componentjava.lang.Exception - if an error occurspublic void put(org.apache.avalon.framework.component.Component component)
throws java.lang.Exception
Subclasses should not extend this method but rather the doPut method below otherwise reference counts will not be supported.
This method is not final to make the class backwards compatible.
component - a Componentjava.lang.Exception - if an error occursprotected org.apache.avalon.framework.component.Component doGet()
throws java.lang.Exception
Component valuejava.lang.Exception - if an error occursprotected void doPut(org.apache.avalon.framework.component.Component component)
throws java.lang.Exception
component - a Component valuejava.lang.Exception - if an error occurspublic final boolean canBeDisposed()
true if this component handler can safely be
disposed (i.e. none of the components it is handling are still
being used).true if this component handler can safely be
disposed; false otherwise