Keel 2.1RC2

org.keel.core.container
Class KeelContainerFactory

java.lang.Object
  extended byorg.keel.core.container.KeelContainerFactory
All Implemented Interfaces:
ContainerFactory

public class KeelContainerFactory
extends java.lang.Object
implements ContainerFactory

This is a helper class that is used to instantiate the top-level Keel container.

Version:
$Revision: 1.2 $ $Date: 2004/05/10 20:55:44 $
Author:
Shash Chatterjee Created on Oct 17, 2002

Field Summary
static java.lang.String CONFIG_PROPERTY
          This is the name of the system property that tells us where to look for our configuration files
private  java.util.Map containerManagers
           
protected  DefaultContext context
           
private static Configuration instrConfig
           
private static Configuration logConfig
           
private static java.lang.String logConfigFilename
           
protected  Logger logger
           
protected  LoggerManager loggerManager
           
private static java.lang.String PREFIX
           
protected  Logger primordialLogger
           
protected  LoggerManager primordialLoggerManager
           
private static Configuration roleConfig
           
protected  ServiceManager serviceManager
           
private static Configuration systemConfig
           
private static MetaInfoManager utilMetaInfoManager
           
private static RoleManager utilRoleManager
           
 
Constructor Summary
KeelContainerFactory()
           
KeelContainerFactory(Logger primordialLogger)
           
 
Method Summary
 void buildConfigs()
           
 Container createContainer()
           
 Container createContainer(java.lang.Object key)
           
protected  LifecycleExtensionManager createLifeCycleExtensionManager(DefaultContext c)
           
private  MetaInfoManager createMetaManager(java.lang.ClassLoader loader)
           
 void disposeContainer()
           
 void disposeContainer(java.lang.Object key)
           
static java.lang.Class getClassForShortName(java.lang.String shortName)
           
 ContainerManager getContainerManager()
           
 Context getContext()
           
static Configuration getInstrConfig()
           
static Configuration getLogConfig()
          Returns the logConfig.
 Logger getLogger()
           
 LoggerManager getLoggerManager()
           
private  Logger getPrimordialLogger()
           
 LoggerManager getPrimordialLoggerManager()
           
static Configuration getRoleConfig()
          Returns the roleConfig.
static Configuration getSystemConfig()
          Returns the systemConfig.
 void setContext(DefaultContext context)
           
private  void setProperties(java.lang.String configPath)
          This method reads the top-level configuration and looks for an element called "system-properties".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

containerManagers

private java.util.Map containerManagers

CONFIG_PROPERTY

public static final java.lang.String CONFIG_PROPERTY
This is the name of the system property that tells us where to look for our configuration files

See Also:
Constant Field Values

PREFIX

private static final java.lang.String PREFIX
See Also:
Constant Field Values

roleConfig

private static Configuration roleConfig

systemConfig

private static Configuration systemConfig

logConfig

private static Configuration logConfig

logConfigFilename

private static java.lang.String logConfigFilename

instrConfig

private static Configuration instrConfig

primordialLogger

protected Logger primordialLogger

primordialLoggerManager

protected LoggerManager primordialLoggerManager

logger

protected Logger logger

loggerManager

protected LoggerManager loggerManager

serviceManager

protected ServiceManager serviceManager

context

protected DefaultContext context

utilRoleManager

private static RoleManager utilRoleManager

utilMetaInfoManager

private static MetaInfoManager utilMetaInfoManager
Constructor Detail

KeelContainerFactory

public KeelContainerFactory()

KeelContainerFactory

public KeelContainerFactory(Logger primordialLogger)
Method Detail

getContainerManager

public ContainerManager getContainerManager()
                                     throws NestedException
Throws:
NestedException

createMetaManager

private MetaInfoManager createMetaManager(java.lang.ClassLoader loader)
                                   throws NestedException
Throws:
NestedException

createLifeCycleExtensionManager

protected LifecycleExtensionManager createLifeCycleExtensionManager(DefaultContext c)

setProperties

private void setProperties(java.lang.String configPath)
                    throws ConfigurationException,
                           java.io.IOException
This method reads the top-level configuration and looks for an element called "system-properties". Each sub-element of this element should be a "property" element, with a "name" and "value" attribute. This sets a single system property for each such element - e.g.
<system-properties> <property name="java.security.auth.login.config" value="%conf%/jaas.config"/> </system-properties> Would set the system property "java.security.auth.login.config" to the jaas.config file. The %conf% prefix is a shorthand for specifying the name of the directory in which the top-level config file is found. E.g. if your top-level config is system.xconf, and it's in /home/keel/keel-build/deploy/server/conf, then "%conf%" will expand to that directory.

Throws:
ConfigurationException
java.io.IOException

buildConfigs

public void buildConfigs()
                  throws NestedException
Throws:
NestedException

getLogConfig

public static Configuration getLogConfig()
Returns the logConfig.

Returns:
Configuration

getRoleConfig

public static Configuration getRoleConfig()
Returns the roleConfig.

Returns:
Configuration

getSystemConfig

public static Configuration getSystemConfig()
Returns the systemConfig.

Returns:
Configuration

getInstrConfig

public static Configuration getInstrConfig()

getContext

public Context getContext()

getPrimordialLogger

private Logger getPrimordialLogger()

getLogger

public Logger getLogger()

getPrimordialLoggerManager

public LoggerManager getPrimordialLoggerManager()

getLoggerManager

public LoggerManager getLoggerManager()

setContext

public void setContext(DefaultContext context)
Parameters:
context -

getClassForShortName

public static java.lang.Class getClassForShortName(java.lang.String shortName)

createContainer

public Container createContainer()
                          throws ContainerException
Specified by:
createContainer in interface ContainerFactory
Throws:
ContainerException
See Also:
ContainerFactory.createContainer()

createContainer

public Container createContainer(java.lang.Object key)
                          throws ContainerException
Specified by:
createContainer in interface ContainerFactory
Throws:
ContainerException
See Also:
ContainerFactory.createContainer(java.lang.Object)

disposeContainer

public void disposeContainer()
                      throws ContainerException
Specified by:
disposeContainer in interface ContainerFactory
Throws:
ContainerException
See Also:
ContainerFactory.disposeContainer()

disposeContainer

public void disposeContainer(java.lang.Object key)
                      throws ContainerException
Specified by:
disposeContainer in interface ContainerFactory
Throws:
ContainerException
See Also:
ContainerFactory.disposeContainer(java.lang.Object)

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.