public class OverrideConfigService extends AbstractConfigService
ConfigService that allows a set of properties to override
properties provided by another parent ConfigServiceconn| Constructor and Description |
|---|
OverrideConfigService(java.util.Properties overrides,
AppContext c)
Constructs a new
OverrideConfigService that will return
properties specified in overrides if they are present. |
OverrideConfigService(java.util.Properties parent,
java.lang.String config_list,
AppContext c)
Constructs
OverrideConfigService where the override properties are loaded
from a file. |
| 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 |
getOverrides() |
java.util.Properties |
getServiceProperties()
return the set of properties defined by the service
|
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, waitgetContextpublic OverrideConfigService(java.util.Properties overrides,
AppContext c)
OverrideConfigService that will return
properties specified in overrides if they are present.
overrides does not contain the requested property,
parent will be used to fetch the requested property.overrides - a collection of properties that will override properties stored in
parentc - AppContextpublic OverrideConfigService(java.util.Properties parent,
java.lang.String config_list,
AppContext c)
OverrideConfigService where the override properties are loaded
from a file.parent - parent Properties for the overridesconfig_list - file to loadc - AppContextpublic void clearServiceProperties()
ConfigServicepublic java.util.Properties getServiceProperties()
ConfigServicepublic java.util.Properties getOverrides()
public void setProperty(java.lang.String name,
java.lang.String value)
throws java.lang.UnsupportedOperationException
ConfigServiceUnsupportedOperationExceptionjava.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.public void addListener(ConfigServiceListener listener)
ConfigService