Skip to content

NodeObserver Design

Phil Leggetter edited this page Sep 16, 2013 · 1 revision

we call node.ready() after populated plugin devs call create() and populate a node's dir contents programmatically - they then have to call node.ready() manually we discover the node, either because it's been copied in or because we've just restarted, and call node.ready()

Interfaces

NodeObserver

  • onNodeReady(Node n);

Node

  • addObserver(NodeObserver o);
  • NodeProperties nodeProperties(String pluginName);
  • ready();

NodeProperties

  • setProperty(String name, String value);
  • String getProperty(String name);

NodeProperties uses node.storageDir to get the location of the persistence store .e.g new File(node.storageDir(pluginName), "plugin.properties") is do we have an issue with live get/set (similar to other conf files) here

ObserverList

(private class to store observers of a node)

Clone this wiki locally