org.apache.avalon.fortress.util
Class FortressConfig

java.lang.Object
  extended byorg.apache.avalon.fortress.util.FortressConfig

public final class FortressConfig
extends java.lang.Object

Helper class to create a m_context for the ContextManager.

Version:
CVS $Revision: 1.23 $ $Date: 2004/04/03 18:10:35 $

Constructor Summary
FortressConfig()
          Creates a m_context builder and initializes it with default values.
FortressConfig(Context parent)
          Creates a m_context builder and initializes it with default values.
 
Method Summary
static Context createDefaultConfig()
          Creates a default m_context.
static Context createDefaultConfig(java.lang.ClassLoader classLoader)
          Creates a default m_context.
 Context getContext()
          Finalizes the m_context and returns it.
 void setCommandFailureHandlerClass(java.lang.Class commandFailureHandlerClass)
          Sets a class whose instance will be used to override the default CommandFailureHandler used by the container.
 void setCommandFailureHandlerClass(java.lang.String commandFailureHandlerClass)
          Sets a class whose instance will be used to override the default CommandFailureHandler used by the container.
 void setCommandSink(org.d_haven.event.Sink commandSink)
           
 void setContainerClass(java.lang.Class containerClass)
           
 void setContainerClass(java.lang.String containerClass)
           
 void setContainerConfiguration(Configuration config)
           
 void setContainerConfiguration(java.lang.String location)
           
 void setContextClassLoader(java.lang.ClassLoader loader)
           
 void setContextDirectory(java.io.File file)
           
 void setContextDirectory(java.lang.String directory)
           
 void setContextRootURL(java.net.URL url)
           
 void setInstrumentManager(InstrumentManager profiler)
           
 void setInstrumentManagerConfiguration(Configuration config)
           
 void setInstrumentManagerConfiguration(java.lang.String location)
           
 void setLifecycleExtensionManager(LifecycleExtensionManager extensionManager)
           
 void setLoggerCategory(java.lang.String category)
           
 void setLoggerManager(LoggerManager logManager)
           
 void setLoggerManagerConfiguration(Configuration config)
           
 void setLoggerManagerConfiguration(java.lang.String location)
           
 void setNumberOfThreadsPerCPU(int numberOfThreads)
           
 void setPoolManager(org.d_haven.mpool.PoolManager poolManager)
           
 void setRoleManager(RoleManager roleManager)
           
 void setRoleManagerClass(java.lang.Class clazz)
           
 void setRoleManagerClass(java.lang.String containerClass)
           
 void setRoleManagerConfiguration(Configuration config)
           
 void setRoleManagerConfiguration(java.lang.String location)
           
 void setServiceManager(ServiceManager componentManager)
           
 void setThreadManager(org.d_haven.event.command.ThreadManager threadManager)
           
 void setThreadTimeout(long timeout)
           
 void setWorkDirectory(java.io.File file)
           
 void setWorkDirectory(java.lang.String directory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FortressConfig

public FortressConfig()
Creates a m_context builder and initializes it with default values. The default values are:


FortressConfig

public FortressConfig(Context parent)
Creates a m_context builder and initializes it with default values.

Parameters:
parent - parent m_context with default values.
Method Detail

createDefaultConfig

public static final Context createDefaultConfig()
Creates a default m_context.


createDefaultConfig

public static final Context createDefaultConfig(java.lang.ClassLoader classLoader)
Creates a default m_context.


getContext

public Context getContext()
Finalizes the m_context and returns it.


setCommandSink

public void setCommandSink(org.d_haven.event.Sink commandSink)

setServiceManager

public void setServiceManager(ServiceManager componentManager)

setLifecycleExtensionManager

public void setLifecycleExtensionManager(LifecycleExtensionManager extensionManager)

setContainerClass

public void setContainerClass(java.lang.String containerClass)
                       throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

setContainerClass

public void setContainerClass(java.lang.Class containerClass)

setCommandFailureHandlerClass

public void setCommandFailureHandlerClass(java.lang.String commandFailureHandlerClass)
                                   throws java.lang.ClassNotFoundException
Sets a class whose instance will be used to override the default CommandFailureHandler used by the container. This makes it possible for applications to decide how they wish to handle failures.

Parameters:
commandFailureHandlerClass - Name of the CommandFailureHandler class to use.
Throws:
java.lang.ClassNotFoundException

setCommandFailureHandlerClass

public void setCommandFailureHandlerClass(java.lang.Class commandFailureHandlerClass)
Sets a class whose instance will be used to override the default CommandFailureHandler used by the container. This makes it possible for applications to decide how they wish to handle failures.

Parameters:
commandFailureHandlerClass - The CommandFailureHandler class to use.

setContainerConfiguration

public void setContainerConfiguration(Configuration config)

setContainerConfiguration

public void setContainerConfiguration(java.lang.String location)

setContextClassLoader

public void setContextClassLoader(java.lang.ClassLoader loader)

setContextDirectory

public void setContextDirectory(java.io.File file)

setContextDirectory

public void setContextDirectory(java.lang.String directory)

setContextRootURL

public void setContextRootURL(java.net.URL url)

setLoggerCategory

public void setLoggerCategory(java.lang.String category)

setLoggerManager

public void setLoggerManager(LoggerManager logManager)

setLoggerManagerConfiguration

public void setLoggerManagerConfiguration(Configuration config)

setLoggerManagerConfiguration

public void setLoggerManagerConfiguration(java.lang.String location)

setInstrumentManager

public void setInstrumentManager(InstrumentManager profiler)

setInstrumentManagerConfiguration

public void setInstrumentManagerConfiguration(Configuration config)

setInstrumentManagerConfiguration

public void setInstrumentManagerConfiguration(java.lang.String location)

setNumberOfThreadsPerCPU

public void setNumberOfThreadsPerCPU(int numberOfThreads)

setPoolManager

public void setPoolManager(org.d_haven.mpool.PoolManager poolManager)

setRoleManager

public void setRoleManager(RoleManager roleManager)

setRoleManagerConfiguration

public void setRoleManagerConfiguration(Configuration config)

setRoleManagerClass

public void setRoleManagerClass(java.lang.String containerClass)
                         throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

setRoleManagerClass

public void setRoleManagerClass(java.lang.Class clazz)

setRoleManagerConfiguration

public void setRoleManagerConfiguration(java.lang.String location)

setThreadTimeout

public void setThreadTimeout(long timeout)

setWorkDirectory

public void setWorkDirectory(java.io.File file)

setWorkDirectory

public void setWorkDirectory(java.lang.String directory)

setThreadManager

public void setThreadManager(org.d_haven.event.command.ThreadManager threadManager)


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.