public abstract class ConfigurableResource_ImplBase extends Resource_ImplBase implements ConfigurableResource
ConfigurableResource
s. Provides access to configuration
parameters as well as basic reconfiguration capability. Subclasses should override the
initialize
and reconfigure
methods to read specific configuration
parameters (after calling super.initialize
or super.reconfigure
).PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT
Constructor and Description |
---|
ConfigurableResource_ImplBase() |
Modifier and Type | Method and Description |
---|---|
Object |
getConfigParameterValue(String aParamName)
Looks up the value of a configuration parameter.
|
Object |
getConfigParameterValue(String aGroupName,
String aParamName)
Looks up the value of a configuration parameter in a group.
|
void |
reconfigure()
Instructs this Resource to re-read its configuration parameter settings.
|
void |
setConfigParameterValue(String aParamName,
Object aValue)
Sets the value of a configuration parameter.
|
void |
setConfigParameterValue(String aGroupName,
String aParamName,
Object aValue)
Sets the value of a configuration parameter in a group.
|
destroy, getCasManager, getLogger, getMetaData, getRelativePathResolver, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger, setMetaData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger
public Object getConfigParameterValue(String aParamName)
ConfigurableResource
This method returns null
if the parameter is optional and has not been assigned
a value. (For mandatory parameters, an exception is thrown during initialization if no value
has been assigned.) This method also returns null
if there is no declared
configuration parameter with the specified name.
getConfigParameterValue
in interface ConfigurableResource
aParamName
- the name of a parameter that is not in any groupaParamName
, null
is
either the parameter does not exist or it has not been assigned a value.ConfigurableResource.getConfigParameterValue(java.lang.String)
public Object getConfigParameterValue(String aGroupName, String aParamName)
ConfigurableResource
This method returns null
if the parameter is optional and has not been assigned
a value. (For mandatory parameters, an exception is thrown during initialization if no value
has been assigned.) This method also returns null
if there is no declared
configuration parameter with the specified name.
getConfigParameterValue
in interface ConfigurableResource
aGroupName
- the name of a configuration group. If the group name is
null
, this method will return the same value as
getParameterValue(String)
.aParamName
- the name of a parameter in the groupaGroupName
with
name aParamName
,,null
is either the
parameter does not exist or it has not been assigned a value.ConfigurableResource.getConfigParameterValue(java.lang.String,
java.lang.String)
public void setConfigParameterValue(String aParamName, Object aValue)
ConfigurableResource
ConfigurableResource.reconfigure()
is called.setConfigParameterValue
in interface ConfigurableResource
aParamName
- the name of a parameter that is not in any groupaValue
- the value to assign to the parameterConfigurableResource.setConfigParameterValue(java.lang.String,
java.lang.Object)
public void setConfigParameterValue(String aGroupName, String aParamName, Object aValue)
ConfigurableResource
ConfigurableResource.reconfigure()
is called.setConfigParameterValue
in interface ConfigurableResource
aGroupName
- the name of a configuration group. If this parameter is
null
, this method will have the same effect as
setParameterValue(String,Object)
.aParamName
- the name of a parameter in the groupaValue
- the value to assign to the parameter.ConfigurableResource.setConfigParameterValue(java.lang.String,
java.lang.String, java.lang.Object)
public void reconfigure() throws ResourceConfigurationException
ConfigurableResource
reconfigure
in interface ConfigurableResource
ResourceConfigurationException
- if the configuration is not validConfigurableResource.reconfigure()
Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.