org.apache.cocoon.core.container.spring.avalon
Class ComponentInfo

java.lang.Object
  extended byorg.apache.cocoon.core.container.spring.avalon.ComponentInfo

public final class ComponentInfo
extends Object

Meta-information about an Avalon based component. This simple bean holds most information of a component defined in the Avalon based configuration files, like the configuration for the component, it's logger etc. Avalon supports different component models: MODEL_PRIMITIVE: Each time a component of this type is requested, a new instance is created. MODEL_SINGLETON: Only on component of this type exists per container. MODEL_POOLED: The container creates a pool of components for this type and serves a request out of this pool. If the pool exceeds, then the pool will create new instances which are not put into the pool, so the model "primitive" will be used.

Since:
2.2
Version:
$Id: ComponentInfo.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
static int MODEL_POOLED
          Several instances are pooled by the container.
static int MODEL_PRIMITIVE
          New instance per lookup.
static int MODEL_SINGLETON
          One single instance per container.
static int MODEL_UNKNOWN
          The model of the component is unknown.
 
Constructor Summary
ComponentInfo()
          Create a new info.
 
Method Summary
 ComponentInfo copy()
          Create a new component info with the same configuration as the current one.
 void fill(Configuration config)
           
 String getAlias()
           
 String getComponentClassName()
           
 Configuration getConfiguration()
           
 String getDefaultValue()
           
 String getDestroyMethodName()
           
 String getInitMethodName()
           
 String getLocation()
           
 String getLoggerCategory()
           
 int getModel()
           
 Parameters getParameters()
           
 String getPoolInMethodName()
           
 String getPoolOutMethodName()
           
 Configuration getProcessedConfiguration()
           
 String getRole()
           
 boolean hasConfiguredLazyInit()
           
 boolean isLazyInit()
           
 boolean isSelector()
          Is this a selector?
 void setAlias(String alias)
           
 void setComponentClassName(String serviceClassName)
           
 void setConfiguration(Configuration configuration)
           
 void setDefaultValue(String defaultValue)
           
 void setDestroyMethodName(String destroyMethod)
           
 void setInitMethodName(String initMethod)
           
 void setLazyInit(boolean lazyInit)
           
 void setLoggerCategory(String loggerCategory)
           
 void setModel(int model)
           
 void setParameters(Parameters parameters)
           
 void setPoolInMethodName(String poolMethod)
           
 void setPoolOutMethodName(String poolMethod)
           
 void setProcessedConfiguration(Configuration processedConfiguration)
           
 void setRole(String role)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MODEL_UNKNOWN

public static final int MODEL_UNKNOWN
The model of the component is unknown. Reflection is used later on to determine the model.

See Also:
Constant Field Values

MODEL_PRIMITIVE

public static final int MODEL_PRIMITIVE
New instance per lookup.

See Also:
Constant Field Values

MODEL_SINGLETON

public static final int MODEL_SINGLETON
One single instance per container.

See Also:
Constant Field Values

MODEL_POOLED

public static final int MODEL_POOLED
Several instances are pooled by the container.

See Also:
Constant Field Values
Constructor Detail

ComponentInfo

public ComponentInfo()
Create a new info.

Method Detail

getModel

public int getModel()
Returns:
Returns the model.

setModel

public void setModel(int model)
Parameters:
model - The model to set.

getDestroyMethodName

public String getDestroyMethodName()
Returns:
Returns the destroyMethod.

setDestroyMethodName

public void setDestroyMethodName(String destroyMethod)
Parameters:
destroyMethod - The destroyMethod to set.

getInitMethodName

public String getInitMethodName()
Returns:
Returns the initMethod.

setInitMethodName

public void setInitMethodName(String initMethod)
Parameters:
initMethod - The initMethod to set.

getPoolInMethodName

public String getPoolInMethodName()
Returns:
Returns the poolInMethodName

setPoolInMethodName

public void setPoolInMethodName(String poolMethod)
Parameters:
poolMethod - The poolInMethod name to set.

getPoolOutMethodName

public String getPoolOutMethodName()
Returns:
Returns the poolOutMethodName

setPoolOutMethodName

public void setPoolOutMethodName(String poolMethod)
Parameters:
poolMethod - The poolOutMethod name to set.

getComponentClassName

public String getComponentClassName()
Returns:
Returns the serviceClassName.

setComponentClassName

public void setComponentClassName(String serviceClassName)
Parameters:
serviceClassName - The serviceClassName to set.

getConfiguration

public Configuration getConfiguration()
Returns:
Returns the configuration.

setConfiguration

public void setConfiguration(Configuration configuration)
Parameters:
configuration - The configuration to set.

getLocation

public String getLocation()

toString

public String toString()
See Also:
Object.toString()

fill

public void fill(Configuration config)

getLoggerCategory

public String getLoggerCategory()
Returns:
Returns the loggerCategory.

setLoggerCategory

public void setLoggerCategory(String loggerCategory)
Parameters:
loggerCategory - The loggerCategory to set.

setRole

public void setRole(String role)
Parameters:
role - The role to set.

getRole

public String getRole()
Returns:
Returns the role.

getParameters

public Parameters getParameters()

setParameters

public void setParameters(Parameters parameters)

getAlias

public String getAlias()

setAlias

public void setAlias(String alias)

isSelector

public boolean isSelector()
Is this a selector?


getDefaultValue

public String getDefaultValue()

setDefaultValue

public void setDefaultValue(String defaultValue)

copy

public ComponentInfo copy()
Create a new component info with the same configuration as the current one.

Returns:
An identical component info.

isLazyInit

public boolean isLazyInit()

setLazyInit

public void setLazyInit(boolean lazyInit)

getProcessedConfiguration

public Configuration getProcessedConfiguration()

setProcessedConfiguration

public void setProcessedConfiguration(Configuration processedConfiguration)

hasConfiguredLazyInit

public boolean hasConfiguredLazyInit()


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.