com.tivoli.twg.engine
Class TWGConfigProperties

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGConfigProperties

public class TWGConfigProperties
extends java.lang.Object

Configuration properties class. This class manages the core properties for the topology engine. It provides a set of methods to allow easy access to these properties. Besides the values loaded from the server properties file, TWGServer.prop, the class also contains standard defaults for any values not provided by the file. See below for instructions for adding a new property and its default value. The property container is initialized by the following steps. The values read from each step can override a previous step. 1) Each property is initialized with a default hard coded value. 2) The global properties file, TWGServer.prop, found and loaded. Its values are used to override the hard-coded defaults. 3) Lastly, the global properties from the java.lang.System class are enumerated and added to the set read from TWGServer.prop. This allows the properties provided through run-time command line options to be used to override TWGServer.prop settings. To add a new property, perform the following steps. 1) Create a new unique constant name. For example, SERVER_PROP_EXTENSIONS_DIRECTORY. Make it "public static final String" and initialize it with the actual name in quotes. 2) Copy the unique name define in step 1 above and add the suffix "_DEFAULT". For example, SERVER_PROP_EXTENSIONS_DIRECTORY_DEFAULT. Make it "public static final String" and initialize it with the actual default value in quotes. 3) Add the key/value pair using the constant names to the initilaizer for variable "propKeyDefaults". For example the initializer would be { SERVER_EXTENSIONS_DIRECTORY, SERVER_EXTENSIONS_DIRECTORY_DEFAULT, ... } Programmers should accesss a configuration property using the "get" method and providing a constant key. See example below. TWGConfigProperty.get( TWGConfigProperty.SERVER_EXTENSIONS_PATH );


Field Summary
static java.lang.String BATCH_QUEUE_THREADS
          Total number of "batch queue" worker threads to make active.
static java.lang.String CLI_GATEWAY_LINK
          This property defines the default CLI server link instance
static java.lang.String CLI_GATEWAY_SEC_HANDLER
          This property defines the name of the security handler (TWGIPCSecurity subclass) to be used for the command line interface
static java.lang.String CLONED_MO_COUNT
          Property defines number of cloned managed object : for scalability simulation
static java.lang.String CLONED_MO_DELAY
          Property defines delay for cloned managed object : for scalability simulation
static java.lang.String CLONED_MO_INTERVAL
          Property defines delay for cloned managed object : for scalability simulation
static java.lang.String CLONED_MO_STEPTIME
          Property defines step time for cloned managed object : for scalability simulation
static java.lang.String DATABASE_CONNECTION_DELAY
          Property defines for database initialization.
static java.lang.String DATABASE_CONNECTION_RETRIES
          Property defines for database initialization.
static java.lang.String DATABASE_ENABLED
          Property defines for database enabled: DISABLED = "0"; ENABLED = "1";
static java.lang.String DATABASE_JDBC_DRIVER_NAME
          This property defines the JDBC driver name.
static java.lang.String DATABASE_JDBC_PASSWORD
          This property defines the database password
static java.lang.String DATABASE_JDBC_SUBNAME
          This property defines the database subname portion of the JDBC URL - jdbc:: (see java.sql.DriverManager) NOTE: the install component assumes the key name hardcoded below
static java.lang.String DATABASE_JDBC_SUBPROTOCOL
          This property defines the database subprotocol portion of the JDBC URL - jdbc:: (see java.sql.DriverManager)
static java.lang.String DATABASE_JDBC_USER
          This property defines the database user name
static java.lang.String DATABASE_USE_TWG_ENCODING
          Property defines allowing encoding character data.
static java.lang.String GATEWAY_LINK
          This property defines the default gateway link instance
static java.lang.String GATEWAY_SEC_HANDLER
          This property defines the name of the security handler (TWGIPCSecurity subclass) to be used for the gateway
static java.lang.String LICENSE_FILE_NAME
          This property defines the file that contains all product license keys.
static java.lang.String MO_DISCOVER_INTERVAL
          Discover interval in mSec (specify 0 to disable discovery).
static java.lang.String MO_INITIAL_PING_DELAY
          Initial delay of a new managed object ping cycle.
static java.lang.String MO_PING_INTERVAL
          Ping interval in mSec (specify 0 to disable pinging).
static java.lang.String MO_PING_WINDOW
          Delay delta of all managed object ping cycles after the first ping cycle.
static java.lang.String MORPH_WINDOW
          Morph window in mSec.
static java.lang.String OLD_LICENSE_FILE_NAME
          This property defines the file that contains all product license keys (old location)
static java.lang.String POPUP_EVENT_LIMIT
          This property defines the maximum number of popup events allowed to be pending
static java.lang.String PROTOCOL_PRIORITY_LIST
          This property defines the priority order for protocol drivers (used by native and MPM provider sites)
static java.lang.String SNMP_TRAP_LISTENER
          Property defines whether SNMP trap listener is enabled.
static java.lang.String START_JVM_MS
          Default minimum heap size parm for started JVM.
static java.lang.String START_JVM_MX
          Default maximum heap size parm for started JVM.
static java.lang.String START_NATIVE
          This property defines the command to use with Runtime's exec() to start a new native process
static java.lang.String START_NEW_JVM
          This property defines the command to use with Runtime's exec() to start a new JVM in a different process arg0 = Java class name arg1 = arguments to pass to Java program arg2 = minimum heap size arg3 = maximum heap size arg4 = enable jit ("true" or "false")
static java.lang.String TASK_ACTIVATION_LOG
          Flat text log filename for task activation log
static java.lang.String TASK_ACTIVATION_LOGBACK
           
static java.lang.String TASK_ACTIVATION_LOGSIZE
           
static java.lang.String TASK_SAMEJVM
          Whether to run configurable task servers in the engine's JVM
static java.lang.String TASK_SVCNODE_TIMEOUT
          Timeout period to wait for a task server's service node to become active during initialization (milliseconds)
static java.lang.String TASK_SYNCH_TIMEOUT
          Timeout period to wait for synchronous task servers to signal ready during initialization (milliseconds)
 
Constructor Summary
TWGConfigProperties()
           
 
Method Summary
static void changePersistantConfigPropertyFile(java.lang.String propertiesFileName)
          Change current property file.
static java.lang.String get(java.lang.String key)
          This method returns a property value from loaded properties.
static java.lang.String get(java.lang.String key, java.lang.String defaultValue)
          This method returns a property value.
static int getAsInt(java.lang.String key, int defaultValue)
          This method returns a property value as an integer value.
static long getAsLong(java.lang.String key, long defaultValue)
          This method returns a property value as a long value.
static java.lang.String getPersistent(java.lang.String key)
          This method returns a property value directly from config property file.
static java.lang.String getPersistent(java.lang.String key, java.lang.String defaultValue)
          This method returns a property value directly from config property file.
static int getPersistentAsInt(java.lang.String key, int defaultValue)
          This method returns a property value as an integer value.
static long getPersistentAsLong(java.lang.String key, long defaultValue)
          This method returns a property value directly from the config file as a long value.
static void handleCommand(Command command)
          This method processes config property commands.
static void initialize()
          Scans and loads all property sources.
static void removePersistant(java.lang.String key)
          This method returns a property value directly from config property file.
static void set(java.lang.String key, int value)
          This method sets a property value in loaded config properties.
static void set(java.lang.String key, java.lang.String value)
          This method sets a property value in loaded config properties.
static void setPersistant(java.lang.String key, int value)
          This method sets a property value in the actual config file.
static void setPersistant(java.lang.String key, java.lang.String value)
          This method sets a property value in the actual config file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GATEWAY_SEC_HANDLER

public static final java.lang.String GATEWAY_SEC_HANDLER
This property defines the name of the security handler (TWGIPCSecurity subclass) to be used for the gateway

See Also:
Constant Field Values

CLI_GATEWAY_SEC_HANDLER

public static final java.lang.String CLI_GATEWAY_SEC_HANDLER
This property defines the name of the security handler (TWGIPCSecurity subclass) to be used for the command line interface

See Also:
Constant Field Values

GATEWAY_LINK

public static final java.lang.String GATEWAY_LINK
This property defines the default gateway link instance

See Also:
Constant Field Values

CLI_GATEWAY_LINK

public static final java.lang.String CLI_GATEWAY_LINK
This property defines the default CLI server link instance

See Also:
Constant Field Values

START_NEW_JVM

public static final java.lang.String START_NEW_JVM
This property defines the command to use with Runtime's exec() to start a new JVM in a different process arg0 = Java class name arg1 = arguments to pass to Java program arg2 = minimum heap size arg3 = maximum heap size arg4 = enable jit ("true" or "false")

See Also:
Constant Field Values

START_JVM_MS

public static final java.lang.String START_JVM_MS
Default minimum heap size parm for started JVM.

See Also:
Constant Field Values

START_JVM_MX

public static final java.lang.String START_JVM_MX
Default maximum heap size parm for started JVM.

See Also:
Constant Field Values

START_NATIVE

public static final java.lang.String START_NATIVE
This property defines the command to use with Runtime's exec() to start a new native process

See Also:
Constant Field Values

BATCH_QUEUE_THREADS

public static final java.lang.String BATCH_QUEUE_THREADS
Total number of "batch queue" worker threads to make active.

See Also:
Constant Field Values

MO_DISCOVER_INTERVAL

public static final java.lang.String MO_DISCOVER_INTERVAL
Discover interval in mSec (specify 0 to disable discovery).

See Also:
Constant Field Values

MO_INITIAL_PING_DELAY

public static final java.lang.String MO_INITIAL_PING_DELAY
Initial delay of a new managed object ping cycle. A random percentage of this number will be delayed before the first ping cycle is instigated for a new managed object. Time in mSec.

See Also:
Constant Field Values

MO_PING_WINDOW

public static final java.lang.String MO_PING_WINDOW
Delay delta of all managed object ping cycles after the first ping cycle. See MO_INITIAL_PING_DELAY. This value is specified as an integer between 0 and 100. It specifies the plus/minus delta for the next ping cycle. Example use: if an MO's ping period is set to 300 seconds, and this value was set to 20, then the MO's actual next ping cycle would start form 240 to 360 seconds from the point of enqueue. Valid range: 0-100

See Also:
Constant Field Values

MO_PING_INTERVAL

public static final java.lang.String MO_PING_INTERVAL
Ping interval in mSec (specify 0 to disable pinging).

See Also:
Constant Field Values

MORPH_WINDOW

public static final java.lang.String MORPH_WINDOW
Morph window in mSec.

See Also:
Constant Field Values

TASK_SYNCH_TIMEOUT

public static final java.lang.String TASK_SYNCH_TIMEOUT
Timeout period to wait for synchronous task servers to signal ready during initialization (milliseconds)

See Also:
Constant Field Values

TASK_SVCNODE_TIMEOUT

public static final java.lang.String TASK_SVCNODE_TIMEOUT
Timeout period to wait for a task server's service node to become active during initialization (milliseconds)

See Also:
Constant Field Values

TASK_SAMEJVM

public static final java.lang.String TASK_SAMEJVM
Whether to run configurable task servers in the engine's JVM

See Also:
Constant Field Values

DATABASE_JDBC_SUBNAME

public static final java.lang.String DATABASE_JDBC_SUBNAME
This property defines the database subname portion of the JDBC URL - jdbc:: (see java.sql.DriverManager) NOTE: the install component assumes the key name hardcoded below

See Also:
Constant Field Values

DATABASE_JDBC_DRIVER_NAME

public static final java.lang.String DATABASE_JDBC_DRIVER_NAME
This property defines the JDBC driver name.

See Also:
Constant Field Values

DATABASE_JDBC_SUBPROTOCOL

public static final java.lang.String DATABASE_JDBC_SUBPROTOCOL
This property defines the database subprotocol portion of the JDBC URL - jdbc:: (see java.sql.DriverManager)

See Also:
Constant Field Values

DATABASE_JDBC_USER

public static final java.lang.String DATABASE_JDBC_USER
This property defines the database user name

See Also:
Constant Field Values

DATABASE_JDBC_PASSWORD

public static final java.lang.String DATABASE_JDBC_PASSWORD
This property defines the database password

See Also:
Constant Field Values

PROTOCOL_PRIORITY_LIST

public static final java.lang.String PROTOCOL_PRIORITY_LIST
This property defines the priority order for protocol drivers (used by native and MPM provider sites)

See Also:
Constant Field Values

LICENSE_FILE_NAME

public static final java.lang.String LICENSE_FILE_NAME
This property defines the file that contains all product license keys.

See Also:
Constant Field Values

OLD_LICENSE_FILE_NAME

public static final java.lang.String OLD_LICENSE_FILE_NAME
This property defines the file that contains all product license keys (old location)

See Also:
Constant Field Values

POPUP_EVENT_LIMIT

public static final java.lang.String POPUP_EVENT_LIMIT
This property defines the maximum number of popup events allowed to be pending

See Also:
Constant Field Values

CLONED_MO_COUNT

public static final java.lang.String CLONED_MO_COUNT
Property defines number of cloned managed object : for scalability simulation

See Also:
Constant Field Values

CLONED_MO_STEPTIME

public static final java.lang.String CLONED_MO_STEPTIME
Property defines step time for cloned managed object : for scalability simulation

See Also:
Constant Field Values

CLONED_MO_DELAY

public static final java.lang.String CLONED_MO_DELAY
Property defines delay for cloned managed object : for scalability simulation

See Also:
Constant Field Values

CLONED_MO_INTERVAL

public static final java.lang.String CLONED_MO_INTERVAL
Property defines delay for cloned managed object : for scalability simulation

See Also:
Constant Field Values

DATABASE_CONNECTION_RETRIES

public static final java.lang.String DATABASE_CONNECTION_RETRIES
Property defines for database initialization. Retries

See Also:
Constant Field Values

DATABASE_CONNECTION_DELAY

public static final java.lang.String DATABASE_CONNECTION_DELAY
Property defines for database initialization. Retries

See Also:
Constant Field Values

DATABASE_USE_TWG_ENCODING

public static final java.lang.String DATABASE_USE_TWG_ENCODING
Property defines allowing encoding character data.

See Also:
Constant Field Values

SNMP_TRAP_LISTENER

public static final java.lang.String SNMP_TRAP_LISTENER
Property defines whether SNMP trap listener is enabled.

See Also:
Constant Field Values

DATABASE_ENABLED

public static final java.lang.String DATABASE_ENABLED
Property defines for database enabled: DISABLED = "0"; ENABLED = "1";

See Also:
Constant Field Values

TASK_ACTIVATION_LOG

public static final java.lang.String TASK_ACTIVATION_LOG
Flat text log filename for task activation log

See Also:
Constant Field Values

TASK_ACTIVATION_LOGSIZE

public static final java.lang.String TASK_ACTIVATION_LOGSIZE
See Also:
Constant Field Values

TASK_ACTIVATION_LOGBACK

public static final java.lang.String TASK_ACTIVATION_LOGBACK
See Also:
Constant Field Values
Constructor Detail

TWGConfigProperties

public TWGConfigProperties()
Method Detail

initialize

public static void initialize()
Scans and loads all property sources.


changePersistantConfigPropertyFile

public static void changePersistantConfigPropertyFile(java.lang.String propertiesFileName)
Change current property file. Change the current in-use property file.


get

public static java.lang.String get(java.lang.String key)
This method returns a property value from loaded properties.

Returns:
value of property, or null of not found

getPersistent

public static java.lang.String getPersistent(java.lang.String key)
This method returns a property value directly from config property file.

Returns:
value of property, or null of not found

get

public static java.lang.String get(java.lang.String key,
                                   java.lang.String defaultValue)
This method returns a property value.

Returns:
value of property, or null of not found

getPersistent

public static java.lang.String getPersistent(java.lang.String key,
                                             java.lang.String defaultValue)
This method returns a property value directly from config property file.

Returns:
value of property, or null of not found

getAsLong

public static long getAsLong(java.lang.String key,
                             long defaultValue)
This method returns a property value as a long value.

Returns:
value of property, or defaultValue if not found.

getPersistentAsLong

public static long getPersistentAsLong(java.lang.String key,
                                       long defaultValue)
This method returns a property value directly from the config file as a long value.

Returns:
value of property, or defaultValue if not found.

getAsInt

public static int getAsInt(java.lang.String key,
                           int defaultValue)
This method returns a property value as an integer value.

Returns:
value of property, or defaultValue if not found.

getPersistentAsInt

public static int getPersistentAsInt(java.lang.String key,
                                     int defaultValue)
This method returns a property value as an integer value.

Returns:
value of property, or defaultValue if not found.

removePersistant

public static void removePersistant(java.lang.String key)
This method returns a property value directly from config property file.

Returns:
value of property, or null of not found

set

public static void set(java.lang.String key,
                       java.lang.String value)
This method sets a property value in loaded config properties.

Returns:
value of property, or null of not found

setPersistant

public static void setPersistant(java.lang.String key,
                                 java.lang.String value)
This method sets a property value in the actual config file. It does not set the value in the loaded property file.

Returns:
value of property, or null of not found

set

public static void set(java.lang.String key,
                       int value)
This method sets a property value in loaded config properties.

Returns:
value of property, or null of not found

setPersistant

public static void setPersistant(java.lang.String key,
                                 int value)
This method sets a property value in the actual config file. It does not set the value in the loaded property file.

Returns:
value of property, or null of not found

handleCommand

public static void handleCommand(Command command)
This method processes config property commands.