org.apache.avalon.excalibur.component
Class DefaultComponentFactory

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.avalon.excalibur.component.AbstractDualLogEnabled
          extended by org.apache.avalon.excalibur.component.DefaultComponentFactory
All Implemented Interfaces:
org.apache.avalon.excalibur.pool.ObjectFactory, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.framework.thread.ThreadSafe

Deprecated. ECM is no longer supported

public class DefaultComponentFactory
extends AbstractDualLogEnabled
implements org.apache.avalon.excalibur.pool.ObjectFactory, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.thread.ThreadSafe

Factory for Avalon components.

Since:
4.0
Version:
CVS $Revision: 1.6 $ $Date: 2004/02/28 11:47:14 $
Author:
Avalon Development Team

Field Summary
private  java.lang.Class m_componentClass
          Deprecated. The class which this ComponentFactory should create.
private  org.apache.avalon.framework.component.ComponentManager m_componentManager
          Deprecated. The component manager for this component.
private  java.util.Map m_componentProxies
          Deprecated. Components created by this factory, and their associated ComponentLocator proxies, if they are Composables.
private  org.apache.avalon.framework.configuration.Configuration m_configuration
          Deprecated. The configuration for this component.
private  org.apache.avalon.framework.context.Context m_context
          Deprecated. The Context for the component
private  java.lang.String m_instrumentableName
          Deprecated. Instrumentable Name assigned to objects created by this factory.
private  org.apache.excalibur.instrument.InstrumentManager m_instrumentManager
          Deprecated. Instrument Manager to register objects created by this factory with (may be null).
private  LogkitLoggerManager m_loggerManager
          Deprecated. The LogkitLoggerManager for child ComponentSelectors
private  ComponentProxyGenerator m_proxyGenerator
          Deprecated.  
private  java.lang.String m_role
          Deprecated.  
private  RoleManager m_roles
          Deprecated. The RoleManager for child ComponentSelectors
private  org.apache.avalon.framework.service.WrapperServiceManager m_serviceManager
          Deprecated. The service manager for this component
 
Constructor Summary
DefaultComponentFactory(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 roles, LogkitLoggerManager loggerManager)
          Deprecated. This constructor has been deprecated in favor of the version below which handles instrumentation.
DefaultComponentFactory(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 roles, LogkitLoggerManager loggerManager, org.apache.excalibur.instrument.InstrumentManager instrumentManager, java.lang.String instrumentableName)
          Deprecated. Construct a new component factory for the specified component.
 
Method Summary
 void decommission(java.lang.Object component)
          Deprecated.  
 void dispose()
          Deprecated.  
 java.lang.Class getCreatedClass()
          Deprecated.  
 java.lang.Object newInstance()
          Deprecated.  
 
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

m_componentClass

private java.lang.Class m_componentClass
Deprecated. 
The class which this ComponentFactory should create.


m_context

private org.apache.avalon.framework.context.Context m_context
Deprecated. 
The Context for the component


m_componentManager

private org.apache.avalon.framework.component.ComponentManager m_componentManager
Deprecated. 
The component manager for this component.


m_serviceManager

private org.apache.avalon.framework.service.WrapperServiceManager m_serviceManager
Deprecated. 
The service manager for this component


m_configuration

private org.apache.avalon.framework.configuration.Configuration m_configuration
Deprecated. 
The configuration for this component.


m_roles

private RoleManager m_roles
Deprecated. 
The RoleManager for child ComponentSelectors


m_loggerManager

private LogkitLoggerManager m_loggerManager
Deprecated. 
The LogkitLoggerManager for child ComponentSelectors


m_componentProxies

private final java.util.Map m_componentProxies
Deprecated. 
Components created by this factory, and their associated ComponentLocator proxies, if they are Composables. These must be seperate maps in case a component falls into more than one category, which they often do.


m_instrumentManager

private org.apache.excalibur.instrument.InstrumentManager m_instrumentManager
Deprecated. 
Instrument Manager to register objects created by this factory with (may be null).


m_instrumentableName

private java.lang.String m_instrumentableName
Deprecated. 
Instrumentable Name assigned to objects created by this factory.


m_proxyGenerator

private ComponentProxyGenerator m_proxyGenerator
Deprecated. 

m_role

private java.lang.String m_role
Deprecated. 
Constructor Detail

DefaultComponentFactory

public DefaultComponentFactory(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 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(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 roles,
                               LogkitLoggerManager loggerManager,
                               org.apache.excalibur.instrument.InstrumentManager instrumentManager,
                               java.lang.String instrumentableName)
Deprecated. 
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 java.lang.Object newInstance()
                             throws java.lang.Exception
Deprecated. 
Specified by:
newInstance in interface org.apache.avalon.excalibur.pool.ObjectFactory
Throws:
java.lang.Exception

getCreatedClass

public java.lang.Class getCreatedClass()
Deprecated. 
Specified by:
getCreatedClass in interface org.apache.avalon.excalibur.pool.ObjectFactory

decommission

public void decommission(java.lang.Object component)
                  throws java.lang.Exception
Deprecated. 
Specified by:
decommission in interface org.apache.avalon.excalibur.pool.ObjectFactory
Throws:
java.lang.Exception

dispose

public void dispose()
Deprecated. 
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable