public class ConfigurationManager extends Object implements Runnable
| Constructor and Description |
|---|
ConfigurationManager(String xmlFilename)
Instantiates a new configuration manager.
|
ConfigurationManager(String xmlFilename,
long rate)
Instantiates a new configuration manager.
|
ConfigurationManager(String xmlFilename,
long rate,
ConfigurationListener[] listeners)
Instantiates a new configuration manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ConfigurationListener lsnr)
Registers a new configuration listener.
|
Object[] |
getConfigurationElements(Class<?> category)
Returns an array of configuration objects registered for a given category
The category specify the class type of the returned object.
|
void |
removeListener(ConfigurationListener lsnr)
Removes a registered configuration listener.
|
void |
run()
Notifies the scheduled configuration events to the registered listeners
If no events are scheduled the thread is blocked waiting for
configuration changes.
|
void |
shutdown()
Stops the notification thread.
|
public ConfigurationManager(String xmlFilename) throws CommonConfigException
xmlFilename - is the path of the XML configuration fileCommonConfigException - if XML file is not correctpublic ConfigurationManager(String xmlFilename, long rate) throws CommonConfigException
xmlFilename - is the path of the XML configuration filerate - is the interval in milliseconds between two consecutive
configuration lookupsCommonConfigException - if XML file is not correctpublic ConfigurationManager(String xmlFilename, long rate, ConfigurationListener[] listeners) throws CommonConfigException
xmlFilename - is the path of the XML configuration filerate - is the interval in milliseconds between two consecutive
configuration lookupslisteners - is the array of listeners to be registered at the startup of
the notification managerCommonConfigException - if XML file is not correctpublic Object[] getConfigurationElements(Class<?> category)
category - is the class type for the registered objectpublic void run()
public void shutdown()
public void addListener(ConfigurationListener lsnr)
lsnr - is the listener to be registeredpublic void removeListener(ConfigurationListener lsnr)
lsnr - is the listener to be removedCopyright © 2018 EMI - European Middleware Initiative. All Rights Reserved.