public class ConfigurationWithPollingSource extends Object implements org.apache.commons.configuration.Configuration
This class can be served as a decorator to an existing configuration to make the property values dynamic.
| Constructor and Description |
|---|
ConfigurationWithPollingSource(org.apache.commons.configuration.Configuration config,
PolledConfigurationSource source,
AbstractPollingScheduler scheduler)
Create an instance and start polling the configuration source
|
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(String key,
Object value)
Delegates to the underlying configuration.
|
void |
clear()
Delegates to the underlying configuration.
|
void |
clearProperty(String key)
Delegates to the underlying configuration.
|
boolean |
containsKey(String arg0)
Delegates to the underlying configuration.
|
BigDecimal |
getBigDecimal(String key)
Delegates to the underlying configuration.
|
BigDecimal |
getBigDecimal(String key,
BigDecimal defaultValue)
Delegates to the underlying configuration.
|
BigInteger |
getBigInteger(String key)
Delegates to the underlying configuration.
|
BigInteger |
getBigInteger(String key,
BigInteger defaultValue)
Delegates to the underlying configuration.
|
boolean |
getBoolean(String key)
Delegates to the underlying configuration.
|
boolean |
getBoolean(String key,
boolean defaultValue)
Delegates to the underlying configuration.
|
Boolean |
getBoolean(String key,
Boolean defaultValue)
Delegates to the underlying configuration.
|
byte |
getByte(String key)
Delegates to the underlying configuration.
|
byte |
getByte(String key,
byte defaultValue)
Delegates to the underlying configuration.
|
Byte |
getByte(String key,
Byte defaultValue)
Delegates to the underlying configuration.
|
org.apache.commons.configuration.Configuration |
getConfiguration() |
double |
getDouble(String key)
Delegates to the underlying configuration.
|
double |
getDouble(String key,
double defaultValue)
Delegates to the underlying configuration.
|
Double |
getDouble(String key,
Double defaultValue)
Delegates to the underlying configuration.
|
float |
getFloat(String key)
Delegates to the underlying configuration.
|
float |
getFloat(String key,
float defaultValue)
Delegates to the underlying configuration.
|
Float |
getFloat(String key,
Float defaultValue)
Delegates to the underlying configuration.
|
int |
getInt(String key)
Delegates to the underlying configuration.
|
int |
getInt(String key,
int defaultValue)
Delegates to the underlying configuration.
|
Integer |
getInteger(String key,
Integer defaultValue)
Delegates to the underlying configuration.
|
Iterator |
getKeys()
Delegates to the underlying configuration.
|
Iterator |
getKeys(String prefix)
Delegates to the underlying configuration.
|
List |
getList(String key)
Delegates to the underlying configuration.
|
List |
getList(String key,
List defaultValue)
Delegates to the underlying configuration.
|
long |
getLong(String key)
Delegates to the underlying configuration.
|
long |
getLong(String key,
long defaultValue)
Delegates to the underlying configuration.
|
Long |
getLong(String key,
Long defaultValue)
Delegates to the underlying configuration.
|
Properties |
getProperties(String key)
Delegates to the underlying configuration.
|
Object |
getProperty(String arg0)
Delegates to the underlying configuration.
|
short |
getShort(String key)
Delegates to the underlying configuration.
|
short |
getShort(String key,
short defaultValue)
Delegates to the underlying configuration.
|
Short |
getShort(String key,
Short defaultValue)
Delegates to the underlying configuration.
|
String |
getString(String key)
Delegates to the underlying configuration.
|
String |
getString(String key,
String defaultValue)
Delegates to the underlying configuration.
|
String[] |
getStringArray(String key)
Delegates to the underlying configuration.
|
boolean |
isEmpty()
Delegates to the underlying configuration.
|
void |
setProperty(String key,
Object value)
Delegates to the underlying configuration.
|
void |
stopPolling() |
org.apache.commons.configuration.Configuration |
subset(String prefix)
Delegates to the underlying configuration.
|
public ConfigurationWithPollingSource(org.apache.commons.configuration.Configuration config,
PolledConfigurationSource source,
AbstractPollingScheduler scheduler)
config - Configuration to delegate tosource - PolledConfigurationSource to poll get new/changed propertiesscheduler - AbstractPollingScheduler to provide the polling schedulepublic final org.apache.commons.configuration.Configuration getConfiguration()
public final void stopPolling()
public void addProperty(String key, Object value)
addProperty in interface org.apache.commons.configuration.Configurationpublic void clear()
clear in interface org.apache.commons.configuration.Configurationpublic void clearProperty(String key)
clearProperty in interface org.apache.commons.configuration.Configurationpublic boolean containsKey(String arg0)
containsKey in interface org.apache.commons.configuration.Configurationpublic BigDecimal getBigDecimal(String key, BigDecimal defaultValue)
getBigDecimal in interface org.apache.commons.configuration.Configurationpublic BigDecimal getBigDecimal(String key)
getBigDecimal in interface org.apache.commons.configuration.Configurationpublic BigInteger getBigInteger(String key, BigInteger defaultValue)
getBigInteger in interface org.apache.commons.configuration.Configurationpublic BigInteger getBigInteger(String key)
getBigInteger in interface org.apache.commons.configuration.Configurationpublic boolean getBoolean(String key, boolean defaultValue)
getBoolean in interface org.apache.commons.configuration.Configurationpublic Boolean getBoolean(String key, Boolean defaultValue)
getBoolean in interface org.apache.commons.configuration.Configurationpublic boolean getBoolean(String key)
getBoolean in interface org.apache.commons.configuration.Configurationpublic byte getByte(String key, byte defaultValue)
getByte in interface org.apache.commons.configuration.Configurationpublic Byte getByte(String key, Byte defaultValue)
getByte in interface org.apache.commons.configuration.Configurationpublic byte getByte(String key)
getByte in interface org.apache.commons.configuration.Configurationpublic double getDouble(String key, double defaultValue)
getDouble in interface org.apache.commons.configuration.Configurationpublic Double getDouble(String key, Double defaultValue)
getDouble in interface org.apache.commons.configuration.Configurationpublic double getDouble(String key)
getDouble in interface org.apache.commons.configuration.Configurationpublic float getFloat(String key, float defaultValue)
getFloat in interface org.apache.commons.configuration.Configurationpublic Float getFloat(String key, Float defaultValue)
getFloat in interface org.apache.commons.configuration.Configurationpublic float getFloat(String key)
getFloat in interface org.apache.commons.configuration.Configurationpublic int getInt(String key, int defaultValue)
getInt in interface org.apache.commons.configuration.Configurationpublic int getInt(String key)
getInt in interface org.apache.commons.configuration.Configurationpublic Integer getInteger(String key, Integer defaultValue)
getInteger in interface org.apache.commons.configuration.Configurationpublic Iterator getKeys()
getKeys in interface org.apache.commons.configuration.Configurationpublic Iterator getKeys(String prefix)
getKeys in interface org.apache.commons.configuration.Configurationpublic List getList(String key, List defaultValue)
getList in interface org.apache.commons.configuration.Configurationpublic List getList(String key)
getList in interface org.apache.commons.configuration.Configurationpublic long getLong(String key, long defaultValue)
getLong in interface org.apache.commons.configuration.Configurationpublic Long getLong(String key, Long defaultValue)
getLong in interface org.apache.commons.configuration.Configurationpublic long getLong(String key)
getLong in interface org.apache.commons.configuration.Configurationpublic Properties getProperties(String key)
getProperties in interface org.apache.commons.configuration.Configurationpublic Object getProperty(String arg0)
getProperty in interface org.apache.commons.configuration.Configurationpublic short getShort(String key, short defaultValue)
getShort in interface org.apache.commons.configuration.Configurationpublic Short getShort(String key, Short defaultValue)
getShort in interface org.apache.commons.configuration.Configurationpublic short getShort(String key)
getShort in interface org.apache.commons.configuration.Configurationpublic String getString(String key, String defaultValue)
getString in interface org.apache.commons.configuration.Configurationpublic String getString(String key)
getString in interface org.apache.commons.configuration.Configurationpublic String[] getStringArray(String key)
getStringArray in interface org.apache.commons.configuration.Configurationpublic boolean isEmpty()
isEmpty in interface org.apache.commons.configuration.Configurationpublic void setProperty(String key, Object value)
setProperty in interface org.apache.commons.configuration.Configurationpublic org.apache.commons.configuration.Configuration subset(String prefix)
subset in interface org.apache.commons.configuration.ConfigurationCopyright © 2015. All Rights Reserved.