|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.go.aist.rtm.RTC.ConfigAdmin
public class ConfigAdmin
Class to manage various configuration information.
Now terms for this class are defined as follows.
Nested Class Summary | |
---|---|
(package private) class |
ConfigAdmin.OnActivateSetCallback
OnActivateSetCallback class |
(package private) class |
ConfigAdmin.OnAddConfigurationAddCallback
OnAddConfigurationAddCallback class |
(package private) class |
ConfigAdmin.OnRemoveConfigurationSetCallback
OnRemoveConfigurationSetCallback class |
(package private) class |
ConfigAdmin.OnSetConfigurationSetCallback
OnSetConfigurationSetCallback class |
(package private) class |
ConfigAdmin.OnUpdateCallback
OnUpdateCallback class |
(package private) class |
ConfigAdmin.OnUpdateParamCallback
OnUpdateParamCallback class |
Constructor Summary | |
---|---|
ConfigAdmin(Properties configsets)
Constructor |
Method Summary | |
---|---|
boolean |
activateConfigurationSet(java.lang.String config_id)
Activate the configuration set |
boolean |
addConfigurationSet(Properties config_set)
Add the configuration value to configuration set |
boolean |
bindParameter(java.lang.String param_name,
ValueHolder var,
java.lang.String def_val)
Setup for configuration parameters |
void |
destruct()
Virtual Destructor |
protected void |
finalize()
finalize |
Properties |
getActiveConfigurationSet()
Get the active configuration set |
java.lang.String |
getActiveId()
Get ID of active configuration set |
Properties |
getConfigurationSet(java.lang.String config_id)
Get a configuration set by specified ID |
java.util.Vector<Properties> |
getConfigurationSets()
Get all configuration sets |
boolean |
haveConfig(java.lang.String config_id)
Check the existence of configuration set |
boolean |
isActive()
Confirm to activate configuration set |
boolean |
isChanged()
Confirm to change configuration parameters |
boolean |
isExist(java.lang.String param_name)
Check the existence of configuration parameters |
void |
onActivateSet(java.lang.String config_id)
Called when the configuration set is made active |
void |
onAddConfigurationSet(Properties config_set)
Called when a set value is added to the configuration set |
void |
onRemoveConfigurationSet(java.lang.String config_id)
Called when the configuration set has been deleted |
void |
onSetConfigurationSet(Properties config_set)
Called when the property is added to the configuration set |
void |
onUpdate(java.lang.String config_set)
When the configuration parameter is updated, it is called. |
void |
onUpdateParam(java.lang.String config_set,
java.lang.String config_param)
When the configuration parameter is updated, it is called. |
boolean |
removeConfigurationSet(java.lang.String config_id)
Remove the configuration set |
boolean |
setConfigurationSetValues(java.lang.String config_id,
Properties config_set)
Add to configuration set from specified property |
void |
setOnActivateSet(OnActivateSetCallbackFunc cb)
Set callback that is called by OnActivateSet. |
void |
setOnAddConfigurationSet(OnAddConfigurationAddCallbackFunc cb)
Set callback that is called by OnSetConfiguration. |
void |
setOnRemoveConfigurationSet(OnRemoveConfigurationSetCallbackFunc cb)
Set callback that is called by OnRemoveConfigurationSet. |
void |
setOnSetConfigurationSet(OnSetConfigurationSetCallbackFunc cb)
Set callback that is called by OnSetConfiguration. |
void |
setOnUpdate(OnUpdateCallbackFunc cb)
Set callback that is called by OnUpdate. |
void |
setOnUpdateParam(OnUpdateParamCallbackFunc cb)
Set callback that is called by OnUpdateParam. |
void |
update()
Update the values of configuration parameters (Active configuration set) |
void |
update(java.lang.String config_set)
Update configuration parameter (By ID) |
void |
update(java.lang.String config_set,
java.lang.String config_param)
Update the values of configuration parameters (By name) |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigAdmin(Properties configsets)
configsets
-
The target property name for setupMethod Detail |
---|
public void destruct()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public boolean bindParameter(java.lang.String param_name, ValueHolder var, java.lang.String def_val)
Bind configuration parameter to its variable. Return false, if configuration parameter of specified name has already existed.
param_name
-
Configuration parameter namevar
-
Configuration parameter variabledef_val
-
Default value of configuration parameter
public void update(java.lang.String config_set)
This operation updates configuration variables by the configuration-set with specified ID. This operation does not change current active configuration-set. Since this operation causes inconsistency between current active configuration set and actual values of configuration variables, user should carefully use it. This operation ends without doing anything, if the configuration-set does not exist.
config_set
-
The target configuration set's ID to setuppublic void update()
When configuration set is updated, update the configuration parameter value to the value that is set to the current active configuration. This update will be executed, only when an active configuration set exists and the content of the configuration set has been updated from the last update.
public void update(java.lang.String config_set, java.lang.String config_param)
This operation updates a configuration variable by the specified configuration parameter in the configuration-set. This operation does not change current active configuration-set. Since this operation causes inconsistency between current active configuration set and actual values of configuration variables, user should carefully use it. This operation ends without doing anything, if the configuration-set or the configuration parameter do not exist.
config_set
-
configuration-set ID.config_param
-
configuration parameter name.public boolean isExist(java.lang.String param_name)
Check the existence of configuration parameters of specified name.
param_name
-
Configuration parameter name
public boolean isChanged()
Confirm that configuration parameters have changed.
public final java.lang.String getActiveId()
Get ID of the current active configuration set.
public final boolean haveConfig(java.lang.String config_id)
Check the existence of specified configuration set.
config_id
-
ID of target configuration set for confirmation
public boolean isActive()
Confirm that configuration set has been activated.
public final java.util.Vector<Properties> getConfigurationSets()
Get all specified configuration sets
public final Properties getConfigurationSet(java.lang.String config_id)
Get a configuration set that was specified by ID Return empty configuration set, if a configuration set of specified ID doesn't exist.
config_id
-
ID of the target configuration set for getting
public boolean setConfigurationSetValues(java.lang.String config_id, Properties config_set)
Add specified property to configuration set that was specified by ID. Return false if configuration set, that matches specified ID, doesn't exist.
config_id
-
ID of the target configuration set for addconfig_set
-
Property to add
public final Properties getActiveConfigurationSet()
Get the current active configuration set. Return empty configuration set, if an active configuration set doesn't exist.
public boolean addConfigurationSet(Properties config_set)
Add the configuration value to configuration set
config_set
-
Property to add
public boolean removeConfigurationSet(java.lang.String config_id)
Remove the configuration set of specified ID Return empty configuration set, if a configuration set of specified ID doesn't exist. The configuration-sets that can be removed by this function are only configuration-sets newly added by the addConfigurationSet() function. The configuration that can be removed by this function is only newly added configuration-set by addConfigurationSet() function. The "default" configuration-set and configurationi-sets that is loaded from configuration file cannot be removed. If the specified configuration is active currently, any configurations are not deleted. Callback functions that are set by addOnRemovedConfigurationSet() will be called if a configuration-set is deleted actually by this function.
config_id
-
ID of the target configuration set for remove
public boolean activateConfigurationSet(java.lang.String config_id)
Activate the configuration set of specified ID Return empty configuration set, if a configuration set of specified ID doesn't exist.
config_id
-
ID of the target configuration set for remove
public void setOnUpdate(OnUpdateCallbackFunc cb)
cb
-
OnUpdateCallback type objectpublic void setOnUpdateParam(OnUpdateParamCallbackFunc cb)
cb
-
OnUpdateParamCallback type objectpublic void setOnSetConfigurationSet(OnSetConfigurationSetCallbackFunc cb)
cb
-
OnSetConfigurationSetCallback type objectpublic void setOnAddConfigurationSet(OnAddConfigurationAddCallbackFunc cb)
cb
-
OnSetConfigurationSetCallback type objectpublic void setOnRemoveConfigurationSet(OnRemoveConfigurationSetCallbackFunc cb)
cb
-
OnRemoveConfigurationSetCallback type objectpublic void setOnActivateSet(OnActivateSetCallbackFunc cb)
cb
-
OnActivateSetCallback type objectpublic void onUpdate(java.lang.String config_set)
Call the set callback object.
config_set
-
The target configuration set's ID to setuppublic void onUpdateParam(java.lang.String config_set, java.lang.String config_param)
Call the set callback object.
config_set
-
configuration-set ID.config_param
-
configuration parameter name.public void onSetConfigurationSet(Properties config_set)
Call the set callback object.
config_set
-
propertypublic void onAddConfigurationSet(Properties config_set)
Call the set callback object.
config_set
-
propertypublic void onRemoveConfigurationSet(java.lang.String config_id)
Call the set callback object.
config_id
-
propertypublic void onActivateSet(java.lang.String config_id)
Call the set callback object.
config_id
-
property
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |