|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jgroup.core.ConfigManager
public final class ConfigManager
The configuration manager class is used initialize the required Jgroup system configuration data, including logging configuration. It will read the logging configuration and the Jgroup system configuration, by parsing the XML files supplied to the JVM using the following system properties:
jgroup.system.config
: XML-based configuration file for
specifying the required system configurations for Jgroup/ARM.
jgroup.system.services
: XML-based configuration file for
specifying the services required for Jgroup/ARM.
jgroup.system.applications
: XML-based configuration file for
specifying the applications used in a Jgroup/ARM system.
jgroup.log.config
: XML-based configuration file for
log4j, allows the user to limit the amount of debug information
being sent to the console; among numerous other configuration
options available through the log4j toolkit. For details concerning
the format of the configuration file, please refer to the log4j
documentation. The default for this property:
config/log4j.xml
In addition, the following logging related system properties may be specified by the user:
jgroup.registry.locator
: The registry locator class to be used
by Jgroup. The default is jgroup.relacs.registry.RelacsRegistryLocator
jgroup.log.app
: The application name that will be appended
to the log filename. Note that, when using the ARM framework (the
ExecDaemon
) to create replicas, the log.app name for the
replica will be given the name of the class (exclusive the package name).
jgroup.log.dir
: The directory into which log files will be
written. If not specified, the default is used (./log
)
jgroup.log.msgcontent
: True/False. Used to turn on/off
the logging of message content at both the mss and daemon level.
The following system properties are initialized at runtime, allowing the log4j toolkit to use these properties in its XML based log file for constructing unique files. Passing these properties to the Java runtime will have no effect as they will be overwritten.
jgroup.log.machine
: The local host of this replica.
jgroup.log.time
: The time when this replica was initialized.
jgroup.log.date
: The date when this replica was initialized.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_REGISTRY_LOCATOR
|
static java.lang.String |
DEFAULT_REPLICATION_MANAGER
|
static boolean |
logMsgContent
Indicates if message content should be logged. |
Constructor Summary | |
---|---|
ConfigManager()
|
Method Summary | |
---|---|
static void |
configureLogging()
Method to set up log directory, and initialize the Log4j configuration. |
static int |
getBootstrapPort()
Returns the port for the bootstrap registry. |
static java.lang.Object |
getConfig(java.lang.Class cl)
Retrieve an instance of the given configuration class, that is containing the configuration information. |
static DistributedSystemConfig |
getDistributedSystem()
Returns the DistributedSystemConfig object. |
static void |
init()
Invoked to initialize various system configuration variables required by Jgroup/ARM. |
static void |
init(java.lang.String urlConfig)
Helper method to parse a specified configuration file instead of the system configured default. |
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 DEFAULT_REGISTRY_LOCATOR
public static final java.lang.String DEFAULT_REPLICATION_MANAGER
public static boolean logMsgContent
jgroup.log.msgcontent
.
Constructor Detail |
---|
public ConfigManager()
Method Detail |
---|
public static void init() throws ConfigurationException
ConfigurationException
- Raised if there was an error parsing the configuration files,
or the system properties required to specify the configuration
file names were unset.public static void init(java.lang.String urlConfig) throws ConfigurationException
urlConfig
-
ConfigurationException
public static void configureLogging() throws ConfigurationException
ConfigurationException
- Thrown if the specified log directory could not be created, or
if the log4j configuration URL was malformed.public static java.lang.Object getConfig(java.lang.Class cl)
Transport
, can be retreived using the class literal
TransportConfig.class
.
cl
- The class literal of the configuration object to retreive.
java.lang.NullPointerException
- If there is no such configuration object in the internal
configuration map. This may occur for two reasons; (i) there
is no such configuration tag specified in the configuration file,
or (ii) the specified class literal is a non-existant class.
java.lang.IllegalStateException
- If the init method was not invoked prior to invoking this method.public static DistributedSystemConfig getDistributedSystem()
DistributedSystemConfig
object.
public static int getBootstrapPort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |