| java.lang.Object com.jcorporate.expresso.kernel.SystemFactory
SystemFactory | public class SystemFactory (Code) | |
This class is the focalpoint class that constructs the Expresso Runtime
system. It loads the Expresso Services files, Metadata files and
constructs everything as needed.
Typical Usage for loading the expresso services configuration from
the classpath:
globalContainer = SystemFactory.buildExpressoComponentSystem(
this.getClass().getResource("Test1ExpressoServices.xml"),
this.getClass().getResource("TestLog4jConfig.xml"),
"/My/Log/Location");
author: Michael Rimov |
Constructor Summary | |
protected | SystemFactory() Default constructor.... |
DEFAULT_EXPRESSO_SERVICES | final public static String DEFAULT_EXPRESSO_SERVICES(Code) | | Default filename to look for in classloader if all else fails.
|
SystemFactory | protected SystemFactory()(Code) | | Default constructor.... should not be accessed directly.
|
buildAndInitializeComponents | public void buildAndInitializeComponents(RootContainerInterface root, ExpressoServicesConfig esc) throws ConfigurationException(Code) | | Goes through and initializes the individual Expresso Components
Parameters: root - the Root container to populate Parameters: esc - the services config file that contains what components shouldbe initialized into the |
buildExpressoComponentSystem | public static RootContainerInterface buildExpressoComponentSystem(String servicesFile, String loggingConfiguration, String logDir) throws ConfigurationException(Code) | | Basic initialization system.
Parameters: servicesFile - The path location of the services file. If null,the system will attempt to use the ClassLoader to locate anexpresso-services file. Parameters: loggingConfiguration - The location of the logging configurationfile. If null, the system will be initialized via a log4j.xmlfile in the classpath. Parameters: logDir - the location where Expresso wants to use as a loggingdirectory. an instantiated Root container. |
buildExpressoComponentSystem | public static RootContainerInterface buildExpressoComponentSystem(URL servicesFile, URL loggingConfiguration, String logDir) throws ConfigurationException(Code) | | Classloader compatable version of the factory system.
Parameters: servicesFile - A URL to the services file. (Might be from aClass.loadResource() call. Parameters: loggingConfiguration - A URL to the logging configuration file(Might also be from a Class.loadResource() file Parameters: logDir - the path location of the log files (optional) A built RootContainer implementation. |
constructComponentContainer | public ComponentContainer constructComponentContainer()(Code) | | Single location that constructs all the Container Implementation
classes. This can be extended here to allow for loading of other
'pluggable' implementations at a later time
a ComponentContainer implementation. |
getInstance | public static SystemFactory getInstance()(Code) | | Factory Method.
an instantiated SystemFactory object |
initialize | protected synchronized RootContainerInterface initialize(URL servicesFile, URL loggingConfiguration, String logDir) throws ConfigurationException(Code) | | Internal usage of the initialization system. It is synchronized so
there is only one runtime parsed and added to a particular Virtual
Machine at a time [should help solve any weird initialization race
conditions and we aren't quite so worried about startup time]
Parameters: servicesFile - A URL to the services file. (Might be from aClass.loadResource() call. Parameters: loggingConfiguration - A URL to the logging configuration file(Might also be from a Class.loadResource() file Parameters: logDir - the path location of the log files (optional) A built RootContainer implementation. |
initialize | protected synchronized RootContainerInterface initialize(String servicesFile, String loggingConfiguration, String logDir) throws ConfigurationException(Code) | | Protected initialization.
Parameters: servicesFile - The path location of the services file. If null,the system will attempt to use the ClassLoader to locate anexpresso-services file. Parameters: loggingConfiguration - The location of the logging configurationfile. If null, the system will be initialized via a log4j.xmlfile in the classpath. Parameters: logDir - the location where Expresso wants to use as a loggingdirectory. an instantiated RootContainerInterface instance throws: ConfigurationException - upon configuration startup error |
|
|