public interface ConfigurableService extends ADEPT2Service
ADEPT2Servic by the means to retrieve
and change the configuration. Not all services allow to change their
configuration at runtime and not all of the configuration may be changed at
all and not by all users. This is reflected in this interface.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONF_RUNTIME_CONF_PREFIX
A prefix for runtime configuration values that have defaults in the
normal configuration to be overridden by the runtime configuration.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getChangeableConfigurationKeys(SessionToken session)
Gets a list of configuration keys that may be changed by the owner of the
designated session token.
|
Configuration |
getConfiguration(SessionToken session)
Gets the configuration of this service for displaying it.
|
void |
setConfigurationValue(SessionToken session,
java.lang.String key,
java.lang.String value)
Sets the designated configuration value.
|
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, startstatic final java.lang.String CONF_RUNTIME_CONF_PREFIX
Configuration getConfiguration(SessionToken session)
setConfigurationValue(SessionToken, String, String) for changing
configuration values.
Note to implementors: As stated above return a copy of the configuration and not the configuration itself. Additionally make sure the returned configuration is serialisable since it may be transfered to a remote machine.
session - The session which is used to check for access rights on this
method.java.util.List<java.lang.String> getChangeableConfigurationKeys(SessionToken session)
session - The session which is used to check for access rights on this
method and to determine which configuration keys can be changed by
the designated user.void setConfigurationValue(SessionToken session, java.lang.String key, java.lang.String value) throws ConfigurationException
Note to implementors: Check the configuration value for validity and the session token for whether it is allowed to change the configuration.
session - The session which is used to check for access rights on this
method.key - The key for the configuration value.value - The string representation of the configuration value to be
set.ConfigurationException - If there are problems setting the designated
value, for instance, the value does not conform to the designated
key or is not a valid value at all, a
ConfigurationException will be thrown.