public interface ConfigurationManager
Modifier and Type | Method and Description |
---|---|
void |
createContext(String aContextName,
ResourceMetaData aResourceMetaData,
Settings externalSettings)
Creates and sets up a new configuration parameter context.
|
ConfigurationParameterDeclarations |
getConfigParameterDeclarations(String aContextName)
Gets the ConfigurationParameterDeclarations for the given context.
|
Object |
getConfigParameterValue(String aQualifiedName)
Retrieves the value for a configuration parameter.
|
Object |
getConfigParameterValue(String aQualifiedParamName,
String aGroupName)
Retrieves the value for a configuration parameter in a group.
|
ConfigurationParameterSettings |
getCurrentConfigParameterSettings(String aContextName)
Gets an object containing the current settings for all configuration parameters within the
given context.
|
void |
reconfigure(String aContextName)
Completes the reconfiguration of parameters within the specified context.
|
void |
setConfigParameterValue(String aQualifiedParamName,
Object aValue)
Sets the value of a configuration parameter.
|
void |
setConfigParameterValue(String aQualifiedParamName,
String aGroupName,
Object aValue)
Sets the value of a configuration parameter in a group.
|
void |
setSession(Session aSession)
Sets the current
Session . |
void createContext(String aContextName, ResourceMetaData aResourceMetaData, Settings externalSettings) throws ResourceConfigurationException
aContextName
- the name of the context in which the configuration parameter is being accessed. This
corresponds to the path through the aggregate resource, e.g /subAE1/annotator1.aResourceMetaData
- metadata object containing the configuration parameter declarations and settings.externalSettings
- the external overridesResourceConfigurationException
- if the configuration settings are invalidvoid setSession(Session aSession)
Session
. The Configuration Manager uses the
Session
object to store changes to configuration settings made by calling the
setConfigParameterValue
methods. This ensures that in a multi-client deployment
those settings only apply to the same client that set them.
Code that uses this class must be sure to call setSession
before using the other
methods (except createContext
) on this class.
aSession
- the session object used to store configuration parameter overrides made by a
particular client.Object getConfigParameterValue(String aQualifiedName)
aQualifiedName
- the fully-qualified configuration parameter name. This is of the form
ContextName + / + ParameterName
.null
is
returned.Object getConfigParameterValue(String aQualifiedParamName, String aGroupName)
aQualifiedParamName
- the fully-qualified configuration parameter name. This is of the form
ContextName + / + ParameterName
.aGroupName
- the name of the parameter groupnull
is
returned.void setConfigParameterValue(String aQualifiedParamName, Object aValue)
reconfigure(String)
is called.aQualifiedParamName
- the fully-qualified configuration parameter name. This is of the form
ContextName + / + ParameterName
.aValue
- the value to assign to the parametervoid setConfigParameterValue(String aQualifiedParamName, String aGroupName, Object aValue)
reconfigure(String)
is called.aQualifiedParamName
- the fully-qualified configuration parameter name. This is of the form
ContextName + / + ParameterName
.aGroupName
- the name of a configuration group. If this parameter is
null
, this method will have the same effect as
setParameterValue(String,Object)
.aValue
- the value to assign to the parametervoid reconfigure(String aContextName) throws ResourceConfigurationException
aContextName
- the name of the context being reconfiguredResourceConfigurationException
- if the new configuration is invalidConfigurationParameterDeclarations getConfigParameterDeclarations(String aContextName)
aContextName
- the name for which to get the parameter declarationsConfigurationParameterSettings getCurrentConfigParameterSettings(String aContextName)
aContextName
- name of context for which to retrieve parameter settingsCopyright © 2006–2017 The Apache Software Foundation. All rights reserved.