|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.avalon.excalibur.component.AbstractDualLogEnabled org.apache.avalon.excalibur.component.AbstractDualLogEnabledInstrumentable org.apache.avalon.excalibur.component.ComponentHandler
This class acts like a Factory to instantiate the correct version of the ComponentHandler that you need.
Field Summary |
Fields inherited from interface org.apache.excalibur.instrument.Instrumentable |
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY |
Constructor Summary | |
ComponentHandler()
Deprecated. Creates a new ComponentHandler. |
Method Summary | |
boolean |
canBeDisposed()
Deprecated. Returns true if this component handler can safely be
disposed (i.e. |
protected Component |
doGet()
Deprecated. Concrete implementation of getting a component. |
protected void |
doPut(Component component)
Deprecated. Concrete implementation of putting back a component. |
Component |
get()
Deprecated. Get an instance of the type of component handled by this handler. |
static ComponentHandler |
getComponentHandler(java.lang.Class componentClass,
Configuration configuration,
ComponentManager componentManager,
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,
Configuration configuration,
ComponentManager componentManager,
Context context,
RoleManager roleManager,
LogkitLoggerManager loggerManager,
InstrumentManager instrumentManager,
java.lang.String instrumentableName)
Deprecated. Looks up and returns a component handler for a given component class. |
static ComponentHandler |
getComponentHandler(Component componentInstance)
Deprecated. |
static ComponentHandler |
getComponentHandler(java.lang.String role,
java.lang.Class componentClass,
Configuration configuration,
ComponentManager componentManager,
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,
Configuration configuration,
ComponentManager componentManager,
Context context,
RoleManager roleManager,
LogkitLoggerManager loggerManager,
InstrumentManager instrumentManager,
java.lang.String instrumentableName)
Deprecated. Looks up and returns a component handler for a given component class. |
void |
put(Component component)
Deprecated. Put back an instance of the type of component handled by this handler. |
Methods inherited from class org.apache.avalon.excalibur.component.AbstractDualLogEnabledInstrumentable |
addChildInstrumentable, addInstrument, getChildInstrumentables, getInstrumentableName, getInstruments, setInstrumentableName |
Methods inherited from class org.apache.avalon.excalibur.component.AbstractDualLogEnabled |
getLogkitLogger, setLogger |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.avalon.framework.activity.Initializable |
initialize |
Methods inherited from interface org.apache.avalon.framework.activity.Disposable |
dispose |
Constructor Detail |
public ComponentHandler()
Method Detail |
public static ComponentHandler getComponentHandler(java.lang.Class componentClass, Configuration configuration, ComponentManager componentManager, 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, Configuration configuration, ComponentManager componentManager, Context context, RoleManager roleManager, LogkitLoggerManager loggerManager, 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, Configuration configuration, ComponentManager componentManager, 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, Configuration configuration, ComponentManager componentManager, Context context, RoleManager roleManager, LogkitLoggerManager loggerManager, 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(Component componentInstance) throws java.lang.Exception
java.lang.Exception
public 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.
Component
java.lang.Exception
- if an error occurspublic void put(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 Component
java.lang.Exception
- if an error occursprotected Component doGet() throws java.lang.Exception
Component
value
java.lang.Exception
- if an error occursprotected void doPut(Component component) throws java.lang.Exception
component
- a Component
value
java.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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |