|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectraccoon.api.PsfRaccoonServices
raccoon.core.utils.CoreHelper
public class CoreHelper
A utility component to retrieve pre-configured services.
Field Summary | |
---|---|
static java.lang.String |
RACCOON_CONFIG_FILE
The default properties file used to configure the Raccoon Core Framework. |
Fields inherited from class raccoon.api.PsfRaccoonServices |
---|
FACTORY, NUCLEUS, RACCOON_NAME, RACCOON_SYS_PROPS, RACCOON_VERSION, RACCOON_VERSION_ID, RACCOON_VERSION_MAJOR, RACCOON_VERSION_MINOR, REPO_GENERATOR, SERVICE_BEAN_ANALYZER, SERVICE_BRIDGE_NAME, SERVICE_CONFIG, SERVICE_JAVA_PARSER, SERVICE_LOGGER, SERVICE_MANAGER, SERVICE_NUCLEUS_NAME, SERVICE_XML_PARSER, UNIT_TESTER, UTILS |
Constructor Summary | |
---|---|
protected |
CoreHelper()
Utility classes should not have a public or default constructor. |
Method Summary | |
---|---|
static IConfig |
getConfig()
Retrieves a configuration session based upon it's logical session name. |
static IConfig |
getConfig(java.lang.String pConfigInstance)
Retrieves a none default configuration session, useful when multiple configuration files are used within a projet. |
static INucleus |
getDefaultNucleus()
Loads and returns the primary/default implementation of INucleus |
static IBeanAnalyzer |
getIntrospector()
Loads the Bean Introspection service. |
static ILogger |
getLog()
Retrieves a logging session based upon it's logical session name. |
static ILogger |
getLog(java.lang.String pLogCategory)
Retrieves a logging session based upon it's logical session name. |
static INucleus |
getNucleus(java.lang.String pNucleusName)
Loads and returns the nucleus instance. |
static IServiceManager |
getServiceManager(java.lang.String pXmlResourceFile)
Retrieves a service manager instance based upon the specified resource manager. |
static IBaseComponent |
lookup(java.lang.String pComponentName)
Retrieves a component that has been loaded and initialised based upon it's logical name. |
static IBaseComponent |
lookup(java.lang.String pComponentName,
java.lang.String pComponentId,
java.util.Hashtable pConfigParams)
Loads a specific component with custom load time configuration. |
static void |
reload()
Unloads all loaded components and reinits the Service Manager. |
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 RACCOON_CONFIG_FILE
raccoon.config.file
Constructor Detail |
---|
protected CoreHelper()
Method Detail |
---|
public static ILogger getLog(java.lang.String pLogCategory) throws RaccoonException
log
be defined in service manager configuration file.
The category name that is to be returned is automatically determined based upon the stack trace (refer to
user documentation for more information).
pLogCategory
- the category name of the log component (usually linked to the class name).
RaccoonException
- if the Service Manager couldn't located the service component labeled 'log'.public static ILogger getLog()
log
is defined in service manager configuration file.
The category name that is to be returned is automatically determined based upon the stack trace (refer to
user documentation for more information).
public static IConfig getConfig() throws RaccoonException
config
is defined in the service manager configuration file.
The default file used is usually raccoon.properties
config
component.
RaccoonException
- if the Service Manager couldn't locate the component named 'config'.public static IConfig getConfig(java.lang.String pConfigInstance) throws RaccoonException
pConfigInstance
- the name of the component, should be an instance of IConfig
RaccoonException
- if the service manager couldn't find the component or if the component isn't an instance
of IConfig
public static IBaseComponent lookup(java.lang.String pComponentName) throws RaccoonException
pComponentName
- the name of the component that was given in the configuration file.
IBaseComponent
instance loaded and initialised if necessary.
RaccoonException
- if the component couldn't be loaded or found.public static IBaseComponent lookup(java.lang.String pComponentName, java.lang.String pComponentId, java.util.Hashtable pConfigParams) throws RaccoonException
core_components.xml
pComponentName
- the logical of the component (config, log, ...)pComponentId
- the unique id of the component (primary key for the service manager)pConfigParams
- the custom load time configuration (each key must correspond to java bean property)
RaccoonException
- if something goes wrong (invalid component, ...)public static IBeanAnalyzer getIntrospector() throws RaccoonException
RaccoonException
- if the service couldn't be loaded or if the configuration file of the Service Manager
is corrupted.public static INucleus getDefaultNucleus() throws RaccoonException
INucleus
RaccoonException
- if the default nucleus implementation couldn't be found.public static INucleus getNucleus(java.lang.String pNucleusName) throws RaccoonException
pNucleusName
- the name of the nucleus instance.
INucleus
RaccoonException
- if the specified nucleus isn't defined in the current repository.public static IServiceManager getServiceManager(java.lang.String pXmlResourceFile) throws RaccoonException
IServiceManager.shutdown(boolean)
when finished with this manager.
pXmlResourceFile
- the name of the XML configuration file to use.
RaccoonException
- if the creation fails.public static void reload() throws RaccoonException
RaccoonException
- if the reload sequence failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |