|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigurableResource
A Resource
that has configuration parameters that can be changed after the Resource has
been instantiated.
To set configuration parameters, call the setConfigParameterValue(String,String,Object)
method for each parameter that is to be set, and then call the reconfigure()
method to
cause the Resource to re-read its configuration settings.
Note that if the Resource attempts to access its configuration settings between the call to
setConfigParameterValue
and the call to reconfigure
, it may
retrieve either the old value or the new value. This decision is left to the framework's
ConfigurationManager
implementation.
Field Summary |
---|
Fields inherited from interface org.apache.uima.resource.Resource |
---|
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_PARAM_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT |
Method Summary | |
---|---|
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. |
Methods inherited from interface org.apache.uima.resource.Resource |
---|
destroy, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger |
Method Detail |
---|
Object getConfigParameterValue(String aParamName)
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.
aParamName
- the name of a parameter that is not in any group
aParamName
, null
is
either the parameter does not exist or it has not been assigned a value.Object getConfigParameterValue(String aGroupName, String aParamName)
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.
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 group
- Returns:
- the value of the parameter in group
aGroupName
with
name aParamName
,,null
is either the
parameter does not exist or it has not been assigned a value.
void setConfigParameterValue(String aParamName, Object aValue)
reconfigure()
is called.
aParamName
- the name of a parameter that is not in any groupaValue
- the value to assign to the parametervoid setConfigParameterValue(String aGroupName, String aParamName, Object aValue)
reconfigure()
is called.
aGroupName
- the name of a configuration group. If this parameter is
null, this method will have the same effet as
setParameterValue(String,Object)
.aParamName
- the name of a parameter in the groupaValue
- the value to assign to the parameter.
void reconfigure() throws ResourceConfigurationException
ResourceConfigurationException
- if the configuration is not valid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |