public class CachedConfigService extends java.lang.Object implements ConfigService
DataBaseConfigService
are very fragile so edit this
at your own peril.Modifier and Type | Field and Description |
---|---|
static Feature |
CACHED_CONFIG_FEATURE |
Constructor and Description |
---|
CachedConfigService(AppContext c) |
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.
|
AppContext |
getContext() |
java.util.Properties |
getServiceProperties()
return the set of properties defined by the service
|
java.lang.Class<ConfigService> |
getType()
Returns the type of service the class should be registered under.
|
static void |
invalidate() |
void |
setProperty(java.lang.String name,
java.lang.String value)
Set a property
This method is for making persistent changes to the configuration.
|
public static final Feature CACHED_CONFIG_FEATURE
public CachedConfigService(AppContext c)
public void clearServiceProperties()
ConfigService
clearServiceProperties
in interface ConfigService
public static void invalidate()
public java.util.Properties getServiceProperties()
ConfigService
getServiceProperties
in interface ConfigService
public AppContext getContext()
getContext
in interface Contexed
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
public void addListener(ConfigServiceListener listener)
ConfigService
addListener
in interface ConfigService
public java.lang.Class<ConfigService> getType()
AppContextService
getType
in interface AppContextService<ConfigService>