org.apache.cocoon.core.container
Class ComponentFactory

java.lang.Object
  extended byorg.apache.cocoon.core.container.ComponentFactory
Direct Known Subclasses:
DefaultServiceSelector.Factory, StandaloneServiceSelector.Factory

public class ComponentFactory
extends Object

Factory for Avalon based components.

Since:
2.2
Version:
$Id: ComponentFactory.java 312861 2005-10-11 11:46:08Z cziegeler $

Field Summary
protected  Logger componentLogger
          The component's logger, which may be different from the environment's logger
protected  Method configureSettingsMethod
           
protected  Core core
           
protected  Method destroyMethod
           
protected  ComponentEnvironment environment
           
protected  Method initMethod
           
protected  Parameters parameters
          The parameters for this component
protected  Method poolInMethod
           
protected  Method poolOutMethod
           
protected  Class serviceClass
           
protected  ComponentInfo serviceInfo
           
 
Constructor Summary
ComponentFactory(ComponentEnvironment environment, ComponentInfo info)
          Construct a new component factory for the specified component.
 
Method Summary
 void decommission(Object component)
          Destroy an instance
 void enteringPool(Object component)
          Handle service specific methods for putting it into the pool
 void exitingPool(Object component)
          Handle service specific methods for getting it out of the pool
 Class getCreatedClass()
           
 Object newInstance()
          Create a new instance
protected  void setupInstance(Object component)
          Invoke the various lifecycle interfaces to setup a newly created component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceInfo

protected final ComponentInfo serviceInfo

environment

protected final ComponentEnvironment environment

componentLogger

protected final Logger componentLogger
The component's logger, which may be different from the environment's logger


parameters

protected final Parameters parameters
The parameters for this component


serviceClass

protected final Class serviceClass

initMethod

protected final Method initMethod

destroyMethod

protected final Method destroyMethod

poolInMethod

protected final Method poolInMethod

poolOutMethod

protected final Method poolOutMethod

configureSettingsMethod

protected Method configureSettingsMethod

core

protected Core core
Constructor Detail

ComponentFactory

public ComponentFactory(ComponentEnvironment environment,
                        ComponentInfo info)
                 throws Exception
Construct a new component factory for the specified component.

Parameters:
environment - Describes the environment for the component.
info - Describes the configuration/settings for the component.
Method Detail

newInstance

public final Object newInstance()
                         throws Exception
Create a new instance

Throws:
Exception

setupInstance

protected void setupInstance(Object component)
                      throws Exception
Invoke the various lifecycle interfaces to setup a newly created component

Parameters:
component -
Throws:
Exception

getCreatedClass

public Class getCreatedClass()

decommission

public void decommission(Object component)
                  throws Exception
Destroy an instance

Throws:
Exception

exitingPool

public void exitingPool(Object component)
                 throws Exception
Handle service specific methods for getting it out of the pool

Throws:
Exception

enteringPool

public void enteringPool(Object component)
                  throws Exception
Handle service specific methods for putting it into the pool

Throws:
Exception


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.