|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.excalibur.system.ContainerManager
The ContainerManager is a single point of contact to manage your Container resources. It takes care of creating the other managers that a Container needs to use, as well as initializing the Container. It is designed to be directly instantiated by whatever class needs to initialize your system.
The ContainerManager provides some constants used in the initial
Parameters
passed into the ContainerManager. The ContainerManager
uses these values to create all the pieces necessary for the Container.
Below is a table that describes what those options are.
Constant | Description |
---|---|
CONTAINER_CLASS |
String fully qualified class name for the container class.
this is absolutely necessary for the ContainerManager to create the
Container class instance.
|
CONTEXT_DIRECTORY |
String path to the Context's root directory. This is
used to resolve all relative paths, and the "context:" psuedo-protocol.
Defaults to "./".
|
WORK_DIRECTORY |
String path to a work area on the file system. Defaults
to "/tmp".
|
XML_PARSER |
String fully qualified class name of the Parser component
implementation. It defaults to
"org.apache.avalon.excalibur.xml.JaxpParser ".
|
LOG_CATEGORY |
String root category name for the container and its manager.
If no value is given, the default (null) is used.
|
LOGKIT_CONFIG |
String path to the LogKitLoggerManager configuration file.
If this is not set, ContainerManager tries the uri
"context://logkit.xconf" . If nothing is there, the
LogKitLoggerManager is not configured. Note: If you
passed in a reference to a LoggerManager yourself, ContainerManager
ignores this parameter altogether.
|
ROLE_CONFIG |
String path to the RoleManager configuration file. If
this is not set, ContainerManager does not create a RoleManager at all.
|
CONTAINER_CONFIG |
String path the points to the container's Configuration
file. This value defaults to the uri "context://container.xconf".
If the Container is Configurable and no entry can be found, then the
Container is given an empty Configuration object.
|
THREADS_CPU |
Integer that holds the value of the number of threads used
by the ThreadManager per CPU. This defaults to 2.
|
CPU_COUNT |
Integer representing the number of CPUs on a machine. The
value is used in efficiency calculations, and determining the number of
threads to have running for the CommandManager. Defaults to 1 .
|
Field Summary | |
static java.lang.String |
CONTAINER_CLASS
|
static java.lang.String |
CONTAINER_CONFIG
|
static java.lang.String |
CONTEXT_DIRECTORY
|
static java.lang.String |
CPU_COUNT
|
static java.lang.String |
LOG_CATEGORY
|
static java.lang.String |
LOGKIT_CONFIG
|
static java.lang.String |
ROLE_CONFIG
|
static java.lang.String |
THREADS_CPU
|
static java.lang.String |
WORK_DIRECTORY
|
static java.lang.String |
XML_PARSER
|
Constructor Summary | |
ContainerManager(org.apache.avalon.framework.parameters.Parameters initialParameters)
This constructor creates a new ContainerManager with a LogKitLoggerManager for managing your logging categories. |
|
ContainerManager(org.apache.avalon.framework.parameters.Parameters initialParameters,
LoggerManager defaultLogManager)
Create a ContainerManager with all the information in the Context, and the supplied LoggerManager. |
|
ContainerManager(org.apache.avalon.framework.parameters.Parameters initialParameters,
LoggerManager defaultLogManager,
java.lang.ClassLoader rootClassLoader)
Create a ContainerManager with all the information in the Context, and the supplied LoggerManager. |
Method Summary | |
org.apache.avalon.framework.component.ComponentManager |
getComponentManager()
Get a reference to the initial ComponentManager used by the ContainerManager to hold the Components used for parsing the config files and setting up the environment. |
protected org.apache.avalon.framework.configuration.Configuration |
getContainerConfig()
Get the Container Configuration hierarchy. |
protected org.apache.avalon.framework.context.Context |
getContext()
Override this if you have any special needs for the Container's Context. |
org.apache.avalon.framework.logger.Logger |
getLogger()
Get a reference the default Logger. |
LoggerManager |
getLoggerManager()
Get the LoggerManager. |
protected org.apache.avalon.framework.configuration.Configuration |
getLogKitConfig()
Get the Container Configuration hierarchy. |
protected org.apache.avalon.framework.configuration.Configuration |
getRoleConfig()
Get the Container Configuration hierarchy. |
protected RoleManager |
getRoleManager()
Sets up the RoleManager. |
protected void |
recycleContainer()
Override this if you have any special needs for the container (such as wanting to use your own class). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CONTEXT_DIRECTORY
public static final java.lang.String WORK_DIRECTORY
public static final java.lang.String CONTAINER_CLASS
public static final java.lang.String XML_PARSER
public static final java.lang.String LOGKIT_CONFIG
public static final java.lang.String ROLE_CONFIG
public static final java.lang.String THREADS_CPU
public static final java.lang.String CONTAINER_CONFIG
public static final java.lang.String LOG_CATEGORY
public static final java.lang.String CPU_COUNT
Constructor Detail |
public ContainerManager(org.apache.avalon.framework.parameters.Parameters initialParameters) throws InitializationException
public ContainerManager(org.apache.avalon.framework.parameters.Parameters initialParameters, LoggerManager defaultLogManager) throws InitializationException
public ContainerManager(org.apache.avalon.framework.parameters.Parameters initialParameters, LoggerManager defaultLogManager, java.lang.ClassLoader rootClassLoader) throws InitializationException
Method Detail |
public org.apache.avalon.framework.component.ComponentManager getComponentManager()
protected void recycleContainer() throws InitializationException
protected org.apache.avalon.framework.context.Context getContext()
public LoggerManager getLoggerManager()
public org.apache.avalon.framework.logger.Logger getLogger()
protected RoleManager getRoleManager()
protected org.apache.avalon.framework.configuration.Configuration getContainerConfig()
protected org.apache.avalon.framework.configuration.Configuration getRoleConfig()
protected org.apache.avalon.framework.configuration.Configuration getLogKitConfig()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |