tyrex.util

Class Configuration

public final class Configuration extends Object

Provides basic configuration for Tyrex components based on the tyrex.config configuration file. Several Tyrex services rely on this configuration file.

Version: $Revision: 1.9 $ $Date: 2004/04/30 06:09:06 $

Author: Assaf Arkin

Field Summary
static booleanconsole
Public member variable that determines whether Tyrex should emit information messages to the console.
static StringCONFIG_SYSTEM_PROPERTY
The system property that specifies the configuration file name.
static StringCOPYRIGHT
The copyright message.
static StringFILE_NAME
The name of the server configuration file (tyrex.config).
static StringPROPERTY_DOMAIN_FILES
Property that specified the name of domain configuration file(s) to load at startup.
static StringPROPERTY_LOG_CONSOLE
Property specifying whether to enable console logging.
static StringPROPERTY_LOG_VERBOSE
Property specifying whether to run in verbose mode.
static StringPROPERTY_SECURE_RANDOM
Property that determines whether to use secure or standard random number generator.
static StringPROPERTY_SYNCH_EVERY
Property that determines the number of unsynchronized cycles before the clock is synchronized.
static StringPROPERTY_UNSYNCH_TICKS
Property that determines the number of clock ticks for each unsynchronized cycle.
static StringPROPERTY_UUID_STATE_FILE
Property that specifies the name of the UUID state file.
static StringTITLE
The product title.
static booleanverbose
Public member variable that determines whether Tyrex should emit verbose information messages, which can be used for troubleshooting purposes.
static StringVENDOR_NAME
The vendor name.
static StringVENDOR_URL
The vendor URL.
static StringVERSION
The version number.
Method Summary
static booleangetBoolean(String name)
static intgetInteger(String name)
static PropertiesgetProperties()
static StringgetProperty(String name, String defValue)
Returns a property from the default configuration file.
static StringgetProperty(String name)
static RandomgetRandom()
Returns a random number generator.

Field Detail

console

public static final boolean console
Public member variable that determines whether Tyrex should emit information messages to the console. This variable is set from the configuration file.

CONFIG_SYSTEM_PROPERTY

public static final String CONFIG_SYSTEM_PROPERTY
The system property that specifies the configuration file name. If this system property is specified, it will be used to load the configuration file. Otherwise, the configuration file FILE_NAME will be looked for in the classpath.

COPYRIGHT

public static final String COPYRIGHT
The copyright message. This variable is read from the configuration file.

FILE_NAME

public static final String FILE_NAME
The name of the server configuration file (tyrex.config).

PROPERTY_DOMAIN_FILES

public static final String PROPERTY_DOMAIN_FILES
Property that specified the name of domain configuration file(s) to load at startup. This value is a comma separated list of zero or more file names. The name of this property is tyrex.domain.files.

PROPERTY_LOG_CONSOLE

public static final String PROPERTY_LOG_CONSOLE
Property specifying whether to enable console logging. tyrex.log.console

PROPERTY_LOG_VERBOSE

public static final String PROPERTY_LOG_VERBOSE
Property specifying whether to run in verbose mode. tyrex.log.verbose

PROPERTY_SECURE_RANDOM

public static final String PROPERTY_SECURE_RANDOM
Property that determines whether to use secure or standard random number generator. This value is true or false. The name of this property is tyrex.random.secure.

PROPERTY_SYNCH_EVERY

public static final String PROPERTY_SYNCH_EVERY
Property that determines the number of unsynchronized cycles before the clock is synchronized. The value is an integer. The name of this property is tyrex.clock.synchEvery.

PROPERTY_UNSYNCH_TICKS

public static final String PROPERTY_UNSYNCH_TICKS
Property that determines the number of clock ticks for each unsynchronized cycle. The value is an integer, the percision is milliseconds. The name of this property is tyrex.clock.unsynchicks.

PROPERTY_UUID_STATE_FILE

public static final String PROPERTY_UUID_STATE_FILE
Property that specifies the name of the UUID state file. The UUID state file is used to store the node identifier and clock sequence. The name of this property is tyrex.uuid.stateFile.

TITLE

public static final String TITLE
The product title. This variable is read from the configuration file.

verbose

public static final boolean verbose
Public member variable that determines whether Tyrex should emit verbose information messages, which can be used for troubleshooting purposes. This variable is set from the configuration file.

VENDOR_NAME

public static final String VENDOR_NAME
The vendor name. This variable is read from the configuration file.

VENDOR_URL

public static final String VENDOR_URL
The vendor URL. This variable is read from the configuration file.

VERSION

public static final String VERSION
The version number. This variable is read from the configuration file.

Method Detail

getBoolean

public static boolean getBoolean(String name)

getInteger

public static int getInteger(String name)

getProperties

public static Properties getProperties()

getProperty

public static String getProperty(String name, String defValue)
Returns a property from the default configuration file.

Parameters: name The property name default The property's default value

Returns: The property's value

getProperty

public static String getProperty(String name)

getRandom

public static Random getRandom()
Returns a random number generator. Depending on the configuration this is either a secure random number generator, or a standard random number generator seeded with the system clock.

Returns: A random number generator

Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.