org.apache.avalon.excalibur.component
Class DefaultComponentFactory

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.avalon.excalibur.component.AbstractDualLogEnabled
              |
              +--org.apache.avalon.excalibur.component.DefaultComponentFactory
All Implemented Interfaces:
Component, Disposable, LogEnabled, Loggable, ObjectFactory, ThreadSafe

public class DefaultComponentFactory
extends AbstractDualLogEnabled
implements ObjectFactory, Disposable, ThreadSafe

Factory for Avalon components.

Since:
4.0
Version:
CVS $Revision: 1.20 $ $Date: 2003/02/25 16:28:21 $
Author:
Berin Loritsch, Paul Russell, Ryan Shaw, Leif Mortenson

Constructor Summary
DefaultComponentFactory(String role, Class componentClass, Configuration configuration, ComponentManager componentManager, Context context, RoleManager roles, LogkitLoggerManager loggerManager)
          Deprecated. This constructor has been deprecated in favor of the version below which handles instrumentation.
DefaultComponentFactory(String role, Class componentClass, Configuration configuration, ComponentManager componentManager, Context context, RoleManager roles, LogkitLoggerManager loggerManager, InstrumentManager instrumentManager, String instrumentableName)
          Construct a new component factory for the specified component.
 
Method Summary
 void decommission(Object component)
           
 void dispose()
           
 Class getCreatedClass()
           
 Object newInstance()
           
 
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
 

Constructor Detail

DefaultComponentFactory

public DefaultComponentFactory(String role,
                               Class componentClass,
                               Configuration configuration,
                               ComponentManager componentManager,
                               Context context,
                               RoleManager roles,
                               LogkitLoggerManager loggerManager)
Deprecated. This constructor has been deprecated in favor of the version below which handles instrumentation.

Construct a new component factory for the specified component.

Parameters:
componentClass - the class to instantiate (must have a default constructor).
configuration - the Configuration object to pass to new instances.
componentManager - the component manager to pass to Composables.
context - the Context to pass to Contexutalizables.
roles - the RoleManager to pass to DefaultComponentSelectors.

DefaultComponentFactory

public DefaultComponentFactory(String role,
                               Class componentClass,
                               Configuration configuration,
                               ComponentManager componentManager,
                               Context context,
                               RoleManager roles,
                               LogkitLoggerManager loggerManager,
                               InstrumentManager instrumentManager,
                               String instrumentableName)
Construct a new component factory for the specified component.

Parameters:
componentClass - the class to instantiate (must have a default constructor).
configuration - the Configuration object to pass to new instances.
componentManager - the component manager to pass to Composables.
context - the Context to pass to Contexutalizables.
roles - the RoleManager to pass to DefaultComponentSelectors.
instrumentManager - the InstrumentManager to register the component with if it is a Instrumentable (May be null).
instrumentableName - The instrument name to assign the component if it is Instrumentable.
Method Detail

newInstance

public Object newInstance()
                   throws Exception
Specified by:
newInstance in interface ObjectFactory
Exception

getCreatedClass

public final Class getCreatedClass()
Specified by:
getCreatedClass in interface ObjectFactory

decommission

public final void decommission(Object component)
                        throws Exception
Specified by:
decommission in interface ObjectFactory
Exception

dispose

public final void dispose()
Specified by:
dispose in interface Disposable


Copyright © 2000-2002 Apache Jakarta Project. All Rights Reserved.