|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.excalibur.component.AbstractDualLogEnabled
org.apache.avalon.excalibur.component.ExcaliburComponentManager
public class ExcaliburComponentManager
Default component manager for Avalon's components.
Field Summary | |
---|---|
static String |
INSTRUMENTABLE_NAME
Deprecated. Instrumentable name used to represent the component-manager. |
Fields inherited from interface org.apache.excalibur.instrument.Instrumentable |
---|
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY |
Constructor Summary | |
---|---|
ExcaliburComponentManager()
Deprecated. Create a new ExcaliburComponentManager. |
|
ExcaliburComponentManager(ClassLoader loader)
Deprecated. Create a new ExcaliburComponentManager with uses a specific Classloader. |
|
ExcaliburComponentManager(ComponentManager manager)
Deprecated. Create the ComponentLocator with a parent ComponentLocator |
|
ExcaliburComponentManager(ComponentManager manager,
ClassLoader loader)
Deprecated. Create the ComponentLocator with a Classloader and parent ComponentLocator |
Method Summary | |
---|---|
void |
addComponent(String role,
Class component,
Configuration configuration)
Deprecated. Add a new component to the manager. |
void |
addComponentInstance(String role,
Component instance)
Deprecated. Add a static instance of a component to the manager. |
void |
configure(Configuration configuration)
Deprecated. Configure the ComponentLocator. |
void |
contextualize(Context context)
Deprecated. Set up the Component's Context. |
void |
dispose()
Deprecated. Properly dispose of the Child handlers. |
Instrumentable[] |
getChildInstrumentables()
Deprecated. Any Object which implements Instrumentable can also make use of other Instrumentable child objects. |
protected ComponentHandler |
getComponentHandler(String role,
Class componentClass,
Configuration configuration,
Context context,
RoleManager roleManager,
LogkitLoggerManager logkitManager)
Deprecated. Obtain a new ComponentHandler for the specified component. |
String |
getInstrumentableName()
Deprecated. Gets the name of the Instrumentable. |
Instrument[] |
getInstruments()
Deprecated. Obtain a reference to all the Instruments that the Instrumentable object wishes to expose. |
boolean |
hasComponent(String role)
Deprecated. Tests for existence of a component. |
void |
initialize()
Deprecated. Properly initialize of the Child handlers. |
Component |
lookup(String role)
Deprecated. Return an instance of a component based on a Role. |
void |
release(Component component)
Deprecated. Release a Component. |
void |
setInstrumentableName(String name)
Deprecated. Sets the name for the Instrumentable. |
void |
setInstrumentManager(InstrumentManager instrumentManager)
Deprecated. Sets the InstrumentManager for child components. |
void |
setLoggerManager(LoggerManager logkit)
Deprecated. Configure the LoggerManager. |
void |
setLogKitManager(LogKitManager logkit)
Deprecated. Configure the LogKitManager |
void |
setRoleManager(RoleManager roles)
Deprecated. Configure the RoleManager |
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 |
Field Detail |
---|
public static final String INSTRUMENTABLE_NAME
Constructor Detail |
---|
public ExcaliburComponentManager()
public ExcaliburComponentManager(ClassLoader loader)
public ExcaliburComponentManager(ComponentManager manager, ClassLoader loader)
public ExcaliburComponentManager(ComponentManager manager)
Method Detail |
---|
public Component lookup(String role) throws ComponentException
lookup
in interface ComponentManager
ComponentException
public boolean hasComponent(String role)
hasComponent
in interface ComponentManager
public void release(Component component)
release
in interface ComponentManager
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void contextualize(Context context)
contextualize
in interface Contextualizable
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void dispose()
dispose
in interface Disposable
public void setRoleManager(RoleManager roles)
setRoleManager
in interface RoleManageable
public void setLogKitManager(LogKitManager logkit)
setLogKitManager
in interface LogKitManageable
public void setInstrumentManager(InstrumentManager instrumentManager)
setInstrumentManager
in interface InstrumentManageable
instrumentManager
- The InstrumentManager for the component to use.public void setInstrumentableName(String name)
This value may be set by a parent Instrumentable, or by the InstrumentManager using the value of the 'instrumentable' attribute in the configuration of the component.
setInstrumentableName
in interface Instrumentable
name
- The name used to identify a Instrumentable.public String getInstrumentableName()
getInstrumentableName
in interface Instrumentable
public Instrument[] getInstruments()
getInstruments
in interface Instrumentable
public Instrumentable[] getChildInstrumentables()
getChildInstrumentables
in interface Instrumentable
public void setLoggerManager(LoggerManager logkit)
setLoggerManager
in interface LoggerManageable
protected ComponentHandler getComponentHandler(String role, Class componentClass, Configuration configuration, Context context, RoleManager roleManager, LogkitLoggerManager logkitManager) throws Exception
componentClass
- Class of the component for which the handle is
being requested.configuration
- The configuration for this component.context
- The current context object.roleManager
- The current RoleManager.logkitManager
- The current LogKitManager.
Exception
- If there were any problems obtaining a ComponentHandlerpublic void addComponent(String role, Class component, Configuration configuration) throws ComponentException
role
- the role name for the new component.component
- the class of this component.configuration
- the configuration for this component.
ComponentException
public void addComponentInstance(String role, Component instance)
role
- the role name for the component.instance
- the instance of the component.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |