| java.lang.Object org.xins.server.ConfigManager
ConfigManager | final class ConfigManager (Code) | | Manager for the runtime configuration file. Owns the watcher for the config
file and is responsible for triggering actions when the file has actually
changed.
version: $Revision: 1.60 $ $Date: 2007/09/18 08:45:05 $ author: Mees Witteman author: Anthony Goubard author: Ernst de Haan |
Method Summary | |
void | configureLogger(Properties properties) Initializes the logging subsystem. | static void | configureLoggerFallback() Initializes the logging subsystem with fallback default settings. | void | destroy() Stops the config file watcher thread. | void | determineConfigFile() Determines the name of the runtime configuration file. | int | determineConfigReloadInterval() Determines the interval for checking the runtime properties file for
modifications. | boolean | determineLogLocale() Determines the log locale. | PropertyReader | getRuntimeProperties() Gets the runtime properties. | void | init() Determines the reload interval for the config file, initializes the API
if the interval has changed and starts the config file watcher. | boolean | propertiesRead() Indicates whether the runtime property file was read successfully. | void | readRuntimeProperties() Unifies the file separator character on the _configFile property and then
reads the runtime properties file, initializes the logging subsystem
with the read properties and then stores those properties on the engine. | void | reloadPropertiesIfChanged() Re-initializes the configuration file listener if there is no file
watcher; otherwise interrupts the file watcher. | void | startConfigFileWatcher(int interval) Starts the runtime configuration file watch thread. |
CONFIG_FILE_SYSTEM_PROPERTY | final static String CONFIG_FILE_SYSTEM_PROPERTY(Code) | | The name of the system property that specifies the location of the
configuration file.
|
CONFIG_INCLUDE_PROPERTY | final static String CONFIG_INCLUDE_PROPERTY(Code) | | The name of the runtime property that specifies the list of runtime
properties file to include. The paths must be relative to the
current config file.
|
CONFIG_RELOAD_INTERVAL_PROPERTY | final static String CONFIG_RELOAD_INTERVAL_PROPERTY(Code) | | The name of the runtime property that specifies the interval
for the configuration file modification checks, in seconds.
|
DEFAULT_CONFIG_RELOAD_INTERVAL | final static int DEFAULT_CONFIG_RELOAD_INTERVAL(Code) | | The default configuration file modification check interval, in seconds.
|
configureLoggerFallback | static void configureLoggerFallback()(Code) | | Initializes the logging subsystem with fallback default settings.
|
destroy | void destroy()(Code) | | Stops the config file watcher thread.
|
determineConfigFile | void determineConfigFile()(Code) | | Determines the name of the runtime configuration file. The system
properties will be queried first. If they do not provide it, then the
servlet initialization properties are tried. Once determined, the name
will be stored internally.
|
determineConfigReloadInterval | int determineConfigReloadInterval() throws InvalidPropertyValueException(Code) | | Determines the interval for checking the runtime properties file for
modifications.
the interval to use, always >= 1. throws: InvalidPropertyValueException - if the interval cannot be determined because it does not qualify as apositive 32-bit unsigned integer number. |
determineLogLocale | boolean determineLogLocale()(Code) | | Determines the log locale.
false if the specified locale is not supported,true otherwise. |
getRuntimeProperties | PropertyReader getRuntimeProperties()(Code) | | Gets the runtime properties.
the runtime properties, never null . |
init | void init()(Code) | | Determines the reload interval for the config file, initializes the API
if the interval has changed and starts the config file watcher.
|
propertiesRead | boolean propertiesRead()(Code) | | Indicates whether the runtime property file was read successfully.
true if the runtime properties are loaded correctly,false otherwise. |
readRuntimeProperties | void readRuntimeProperties()(Code) | | Unifies the file separator character on the _configFile property and then
reads the runtime properties file, initializes the logging subsystem
with the read properties and then stores those properties on the engine.
If the _configFile is empty, then an empty set of properties is set on
the engine.
|
reloadPropertiesIfChanged | void reloadPropertiesIfChanged()(Code) | | Re-initializes the configuration file listener if there is no file
watcher; otherwise interrupts the file watcher.
|
|
|