Class RingLeader

java.lang.Object
  |
  +--Process
        |
        +--RingLeader
All Implemented Interfaces:
Election, MsgHandler

public class RingLeader
extends Process
implements Election


Constructor Summary
RingLeader(Linker initComm, int number)
           
 
Method Summary
 int getLeader()
           
 void handleMsg(Msg m, int src, java.lang.String tag)
           
 void startElection()
           
 
Methods inherited from class Process
broadcastMsg, isNeighbor, myWait, receiveMsg, sendMsg, sendMsg, sendMsg, sendMsg, sendToNeighbors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface MsgHandler
receiveMsg
 

Constructor Detail

RingLeader

public RingLeader(Linker initComm,
                  int number)
Method Detail

getLeader

public int getLeader()
Specified by:
getLeader in interface Election

handleMsg

public void handleMsg(Msg m,
                      int src,
                      java.lang.String tag)
Specified by:
handleMsg in interface MsgHandler
Overrides:
handleMsg in class Process

startElection

public void startElection()
Specified by:
startElection in interface Election