public class DefaultConfigService extends AbstractConfigService implements ConfigService, Contexed
ConfigService
This starts| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUILD_PATH_PROP_NAME |
static java.lang.String |
CONFIG_PATH_PROP_NAME |
static java.lang.String |
DEFAULT_PATH_PROP_NAME |
static java.lang.String |
DEPLOY_PATH_PROP_NAME |
protected java.util.Set<ConfigServiceListener> |
listeners |
conn| Constructor and Description |
|---|
DefaultConfigService(AppContext conn) |
DefaultConfigService(AppContext conn,
java.util.Properties p)
Initialise with a specific set of default props rather than the system properties.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ConfigServiceListener listener)
register a ConfigServiceListener
|
void |
cleanup()
AppContext is being closed. |
void |
clearServiceProperties()
clear any cached properties.
|
java.util.Properties |
getServiceProperties()
Service Context Attributes - loadAttributes if the config.path property is
defined then load from that file.
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Set a property
This method is for making persistent changes to the configuration.
|
getType, loadFile, processAdditionsgetContext, getLogger, resetLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContextgetTypepublic static final java.lang.String BUILD_PATH_PROP_NAME
public static final java.lang.String DEPLOY_PATH_PROP_NAME
public static final java.lang.String CONFIG_PATH_PROP_NAME
public static final java.lang.String DEFAULT_PATH_PROP_NAME
protected java.util.Set<ConfigServiceListener> listeners
public DefaultConfigService(AppContext conn)
public DefaultConfigService(AppContext conn, java.util.Properties p)
System.getProperties().conn - p - public java.util.Properties getServiceProperties()
getServiceProperties in interface ConfigServicepublic void addListener(ConfigServiceListener listener)
ConfigServiceaddListener in interface ConfigServicepublic void clearServiceProperties()
ConfigServiceclearServiceProperties in interface ConfigServicepublic void setProperty(java.lang.String name,
java.lang.String value)
throws java.lang.UnsupportedOperationException
ConfigServiceUnsupportedOperationExceptionsetProperty in interface ConfigServicejava.lang.UnsupportedOperationExceptionpublic void cleanup()
AppContextCleanupAppContext is being closed.
Only use this for cleanup that can't be handled by
normal garbage collection or for state which is never returned by reference.cleanup in interface AppContextCleanup