|
||||||||||
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.excalibur.instrument.AbstractLogEnabledInstrumentable
org.apache.avalon.fortress.impl.handler.ComponentFactory
public final class ComponentFactory
Factory for Avalon components.
Nested Class Summary | |
---|---|
protected class |
ComponentFactory.ClassInfo
This class collects all information about the components class: - the constructor to use - the parameters to pass into the constructor - Additional infos about implemented methods |
Field Summary |
---|
Fields inherited from interface org.apache.excalibur.instrument.Instrumentable |
---|
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY |
Constructor Summary | |
---|---|
ComponentFactory(Class componentClass,
org.apache.avalon.framework.configuration.Configuration configuration,
org.apache.avalon.framework.service.ServiceManager serviceManager,
org.apache.avalon.framework.context.Context context,
LoggerManager loggerManager,
LifecycleExtensionManager extManager)
Construct a new component factory for the specified component. |
Method Summary | |
---|---|
protected void |
configureComponent(Object component)
Configure the component |
protected void |
contextualizeComponent(Object component)
Contextualize the component |
protected Object |
createComponent()
Create a new component |
void |
dispose(Object component)
Disposal of the supplied component instance. |
protected void |
enabledComponentLogging(Object component)
Enable logging for the component |
Class |
getCreatedClass()
Returns the component class. |
Object |
newInstance()
Returns a new instance of a component and optionally applies a logging channel, instrumentation, context, a component or service manager, configuration, parameters, lifecycle extensions, initialization, and execution phases based on the interfaces implemented by the component class. |
protected void |
serviceComponent(Object component)
Service the component |
Methods inherited from class org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable |
---|
addChildInstrumentable, addInstrument, getChildInstrumentables, getInstrumentableName, getInstruments, setInstrumentableName |
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 |
Constructor Detail |
---|
public ComponentFactory(Class componentClass, org.apache.avalon.framework.configuration.Configuration configuration, org.apache.avalon.framework.service.ServiceManager serviceManager, org.apache.avalon.framework.context.Context context, LoggerManager loggerManager, LifecycleExtensionManager extManager)
componentClass
- the class to instantiate (must have a default constructor).configuration
- the Configuration
object to pass to new instances.serviceManager
- the service manager to pass to Serviceable
s.context
- the Context
to pass to Contexutalizable
s.loggerManager
- the loggerManager manager instance.Method Detail |
---|
public Object newInstance() throws Exception
newInstance
in interface org.d_haven.mpool.ObjectFactory
Exception
public final Class getCreatedClass()
getCreatedClass
in interface org.d_haven.mpool.ObjectFactory
public final void dispose(Object component) throws Exception
dispose
in interface org.d_haven.mpool.ObjectFactory
component
- the component to dispose of
Exception
- if a disposal error occursprotected Object createComponent() throws Exception
Exception
protected void enabledComponentLogging(Object component) throws Exception
Exception
protected void contextualizeComponent(Object component) throws Exception
Exception
protected void serviceComponent(Object component) throws Exception
Exception
protected void configureComponent(Object component) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |