|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeersim.pastry.MSPastryProtocol
public class MSPastryProtocol
Nested Class Summary | |
---|---|
static interface |
MSPastryProtocol.Listener
Event Handler container for managing the receiving of a message |
Field Summary | |
---|---|
LeafSet |
leafSet
leaf set of this pastry node |
java.math.BigInteger |
nodeId
nodeId of this pastry node |
RoutingTable |
routingTable
routing table of this pastry node |
Constructor Summary | |
---|---|
MSPastryProtocol(java.lang.String prefix)
Used only by the initializer when creating the prototype Every other instance call CLONE to create the new object. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Replicate this object by returning an identical copy. |
MSPastryProtocol |
get(int i)
shortcut for getting the MSPastry level of the node with index "i" in the network |
peersim.transport.Transport |
getTr(int i)
shortcut for getting the Transport level of the node with index "i" in the network |
void |
join()
Given that this node was correctly initialized (e.g. |
void |
processEvent(peersim.core.Node myNode,
int myPid,
java.lang.Object event)
manage the peersim receiving of the events |
void |
receiveRoute(Message m)
see MSPastry protocol "ReceiveRoute" primitive |
void |
send(java.math.BigInteger recipient,
java.lang.Object data)
This primitive provide the sending of the data to dest, by encapsulating it into a LOOKUP Message |
void |
setListener(MSPastryProtocol.Listener l)
allows to change/clear the listener |
void |
setNodeId(java.math.BigInteger tmp)
set the current NodeId |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.math.BigInteger nodeId
public RoutingTable routingTable
public LeafSet leafSet
Constructor Detail |
---|
public MSPastryProtocol(java.lang.String prefix)
prefix
- StringMethod Detail |
---|
public void setListener(MSPastryProtocol.Listener l)
l
- Listenerpublic java.lang.Object clone()
clone
in interface peersim.core.Protocol
clone
in class java.lang.Object
public void receiveRoute(Message m)
m
- Messagepublic void join()
public final MSPastryProtocol get(int i)
i
- int
public final peersim.transport.Transport getTr(int i)
i
- int
public void send(java.math.BigInteger recipient, java.lang.Object data)
recipient
- BigIntegerdata
- Objectpublic void processEvent(peersim.core.Node myNode, int myPid, java.lang.Object event)
processEvent
in interface peersim.edsim.EDProtocol
myNode
- NodemyPid
- intevent
- Objectpublic void setNodeId(java.math.BigInteger tmp)
tmp
- BigInteger
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |