public class DefaultConfigService extends AbstractConfigService implements ConfigService, Contexed
ConfigService
This startsModifier 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, processAdditions
getContext, getLogger, resetLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext
getType
public 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 ConfigService
public void addListener(ConfigServiceListener listener)
ConfigService
addListener
in interface ConfigService
public void clearServiceProperties()
ConfigService
clearServiceProperties
in interface ConfigService
public void setProperty(java.lang.String name, java.lang.String value) throws java.lang.UnsupportedOperationException
ConfigService
UnsupportedOperationException
setProperty
in interface ConfigService
java.lang.UnsupportedOperationException
public void cleanup()
AppContextCleanup
AppContext
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