| java.lang.Object ti.chimera.registry.Node ti.chimera.registry.PersistentNode
PersistentNode | public class PersistentNode extends Node (Code) | | A node that persistently stores its value. When a persistent node is
first linked in to the tree, it checks for a previously stored value, as
identified by the primary path (ie. the first path the node is linked
to) and if a previously stored value is found, it overrides the initial
value specified in the constructor. The value of a persistent node must
be
java.io.Serializable .
Note that currently values of a persistent node are stored when they are
set, rather than at system exit, so the stored value won't reflect side-
effects... for example if the value is a list, and an element is added
to the list after the value of the node gets set, the stored value won't
reflect the element added to the list. This is deemed to be the correct
behavior because it is consistent with the registry in that values of
registry nodes are only published to subscribers when they are changed
(via
PersistentNode.setValue ).
Description of properties that are interesting:
property |
description |
regular default |
webstart default |
chimera.config.path |
where the persistent registry nodes are stored
| $CWD/config.jar |
$HOME/.config.jar |
author: ;Rob Clark;a0873619;San Diego;; version: 0.1 |
Constructor Summary | |
public | PersistentNode(Object value, NodeContract contract, String comment) Class Constructor.
Parameters: value - the node's initial value Parameters: contract - the node's contract, or null Parameters: comment - a string containing a description of the purposeof this node, the node's usage, etc. |
Method Summary | |
void | link(String path) Called by the registry before this node is linked in to the tree. | public void | setValue(Object value) Set the value of this node, and publish the new value to all the
subscribers. |
PersistentNode | public PersistentNode(Object value, NodeContract contract, String comment)(Code) | | Class Constructor.
Parameters: value - the node's initial value Parameters: contract - the node's contract, or null Parameters: comment - a string containing a description of the purposeof this node, the node's usage, etc. Can contain HTML markup. |
link | void link(String path)(Code) | | Called by the registry before this node is linked in to the tree. This
should not be called anywhere else, otherwise undefined behaviour may
ensue. (Translation: Nothing to see here, move along.).
|
setValue | public void setValue(Object value)(Code) | | Set the value of this node, and publish the new value to all the
subscribers.
Parameters: value - the node's new value |
|
|