|
qflib 0.98.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Configurable interface is used together with the Configuration
class to make an Object's state persistent.
A Configurable has a name under which it is registered within the Configuration. When the Configuration is saved, it queries all registered Configurables for their state, which will be passed back to them, when the Configuration is restored.
A Configurable should notify the Configuration via Configuration.stateChanged
, when its state
changes.
Configuration
Method Summary | |
java.lang.String |
getConfigurableName()
Get the Configurable's name. |
java.util.Properties |
getConfigurableState()
Get the Configurable's state. |
void |
registrationChanged(Configuration config,
java.lang.String name,
boolean registered,
boolean valuesKept)
This callback is used to notify the Configurable whenever it is registered with or unregistered from the Configuration, so it can decide whether to notify the Configuration when its state changes. |
void |
setConfigurableName(java.lang.String name)
Set the Configurable's name. |
void |
setConfigurableState(java.util.Properties state)
Set the Configurable's state. |
Method Detail |
public void setConfigurableName(java.lang.String name)
name
- The name to set.public java.lang.String getConfigurableName()
public java.util.Properties getConfigurableState()
public void setConfigurableState(java.util.Properties state)
state
- The state to set.public void registrationChanged(Configuration config, java.lang.String name, boolean registered, boolean valuesKept)
config
- The affected Configuration.name
- The registration name of the Configurable which may
be different from the Configurable's name.registered
- True if the Configurable was just registered,
false if it was unregistered.valuesKept
- Whether the Configurable's values were kept, if
it was just unregistered.
|
qflib 0.98.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |