planet.badchord
Class BadChordNode

java.lang.Object
  extended by planet.generic.commonapi.NodeImpl
      extended by planet.chord.ChordNode
          extended by planet.badchord.BadChordNode
All Implemented Interfaces:
java.io.Serializable, Node

public class BadChordNode
extends ChordNode

A Chord node is single entity in the chord network. It extends of the class Node and specializes following the lookup Chord protocol. Moreover, the stabilization implementation, producing the periodic stabilition events.

Author:
Ruben Mondejar , Carles Pairot , Jordi Pujol
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class planet.chord.ChordNode
ChordNode.FindPredListener, ChordNode.FindSuccListener, ChordNode.FixFingerTask, ChordNode.GetPreListener, ChordNode.LookupListener, ChordNode.StabilizeTask
 
Field Summary
 
Fields inherited from class planet.chord.ChordNode
auxCAPI, BROADCAST, DATA, deux, FIND_PRE, FIND_SUCC, finger, finger_changes, GET_PRE, hasFailed, hasLeaved, MAX, MODES, NOTIFY, null_pointers, predecessor, realStabilizationRate, REFRESH, REPLY, REQUEST, SET_PRE, SET_SUCC, stabRate, start, succ_list, SUCC_LIST, temp, TYPES
 
Fields inherited from class planet.generic.commonapi.NodeImpl
endpoints, id, listeners, nodeHandle, role
 
Constructor Summary
BadChordNode(Id id)
          Constructor, create a new BadChordNode instance with this node Id
 
Method Summary
 void dispatcher(RouteMessage msg)
          Treats the messages and according to the case, executes the generic listeners or listeners specialized, forward the messages or send responses messages
 
Methods inherited from class planet.chord.ChordNode
broadcast, clearFingerChanges, closest_preceding_finger, fail, find_predecessor, find_predecessor, find_successor, find_successor, firstLocalLookup, fix_fingers, getAllLinks, getBroadcastMessage, getClosestNodeHandle, getDataMessage, getEInGML, getFingerChanges, getInfo, getLocalHandle, getPred, getSucc, getSuccList, isAlive, join, leave, localLookup, lookup, neighborSet, networkStabilized, notify, outMessages, prettyPrintNode, printNode, process, range, replicaSet, routeData, routingData, sendData, setFinger, setPred, setSucc, stabilize, toString
 
Methods inherited from class planet.generic.commonapi.NodeImpl
addMessageListener, dispatchDataMessage, getId, getIdFactory, getNewE, getRegisteredApplication, getRegisteredApplications, hasMoreMessages, invokeByStepToAllApplications, isLocalMessage, nextMessage, playsGoodRole, receive, registerApplication, removeMessageListener, send, setGoodRole, setTimer, setTimer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BadChordNode

public BadChordNode(Id id)
             throws InitializationException
Constructor, create a new BadChordNode instance with this node Id

Parameters:
id - Id to set to the new node
Throws:
InitializationException
Method Detail

dispatcher

public void dispatcher(RouteMessage msg)
Treats the messages and according to the case, executes the generic listeners or listeners specialized, forward the messages or send responses messages

Overrides:
dispatcher in class ChordNode
Parameters:
msg - IMessage to treat