The NodeImpl class implements the Node interface and is a generic node implentation that already provides some basic features for the developer.

To create an overlay create a class that extends the NodeImpl class It provides several life-cycle events of a node:

  • void join(NodeHandle boot) is called by the simulator when the node joins the network. Here you have to implement the code what the node has to do when it joins. If it is the first node that joins the regular NetworkImpl? will pass the a bootstrap that is equal to the local bootstrap, so bootstrap == this.nodeHandle would be true.
  • boolean process(int actualStep) is called by the simulator allows the node to do some local actions, the actualStep indicates the the current step in the simulation. If you extend from NodeImpl you should call super.process(actualStep) as well. After you are done with the process you have to return false if your node is stable which means it has found its place in the network and doesn't to do more actions, else e.g. if it isn't done with the join in the network, return true
  • void leave()
  • void fail()