|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.pastry.messaging.Message rice.pastry.messaging.PRawMessage rice.pastry.routing.RouteMessage
A route message contains a pastry message that has been wrapped to be sent to another pastry node.
Field Summary | |
NodeHandle |
nextHop
DESCRIBE THE FIELD |
static short |
TYPE
DESCRIBE THE FIELD |
Fields inherited from class rice.pastry.messaging.Message |
DEFAULT_PRIORITY_LEVEL |
Fields inherited from interface rice.p2p.commonapi.Message |
HIGH_PRIORITY, LOW_PRIORITY, MAX_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY |
Constructor Summary | |
RouteMessage(Id target,
int auxAddress,
NodeHandle prev,
InputBuffer buf,
NodeHandleFactory nhf,
PastryNode pn)
Constructor for RouteMessage. |
|
RouteMessage(Id target,
Message msg)
Constructor. |
|
RouteMessage(Id target,
Message msg,
NodeHandle firstHop)
Constructor. |
|
RouteMessage(Id target,
Message msg,
NodeHandle firstHop,
SendOptions opts)
Constructor. |
|
RouteMessage(Id target,
Message msg,
SendOptions opts)
Constructor. |
|
RouteMessage(Id target,
PRawMessage msg,
NodeHandle firstHop,
SendOptions opts)
Constructor for RouteMessage. |
|
RouteMessage(NodeHandle dest,
Message msg,
SendOptions opts)
Constructor. |
Method Summary | |
static RouteMessage |
build(InputBuffer buf,
NodeHandleFactory nhf,
PastryNode pn)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + int auxAddress + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + Id target + + + + + + + + + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + NodeHandle prev + + (used to repair routing table during routing) + + + ... |
int |
getAuxAddress()
Gets the AuxAddress attribute of the RouteMessage object |
int |
getDestination()
Get receiver address. |
Id |
getDestinationId()
Gets the DestinationId attribute of the RouteMessage object |
short |
getInternalType()
Gets the InternalType attribute of the RouteMessage object |
Message |
getMessage()
Gets the Message attribute of the RouteMessage object |
Message |
getMessage(MessageDeserializer md)
Gets the Message attribute of the RouteMessage object |
NodeHandle |
getNextHop()
Gets the NextHop attribute of the RouteMessage object |
NodeHandle |
getNextHopHandle()
Gets the NextHopHandle attribute of the RouteMessage object |
SendOptions |
getOptions()
Get transmission options. |
NodeHandle |
getPrevNode()
Gets the PrevNode attribute of the RouteMessage object |
byte |
getPriority()
Get priority |
Id |
getTarget()
Gets the target node id of this message. |
short |
getType()
Gets the Type attribute of the RouteMessage object |
boolean |
routeMessage(NodeHandle localHandle)
Routes the messages if the next hop has been set up. |
void |
serialize(OutputBuffer buf)
DESCRIBE THE METHOD |
void |
setDestinationId(Id id)
Sets the DestinationId attribute of the RouteMessage object |
void |
setMessage(Message message)
Sets the Message attribute of the RouteMessage object |
void |
setMessage(RawMessage message)
Sets the Message attribute of the RouteMessage object |
void |
setNextHop(NodeHandle nh)
Sets the NextHop attribute of the RouteMessage object |
void |
setNextHopHandle(NodeHandle nextHop)
Sets the NextHopHandle attribute of the RouteMessage object |
void |
setPrevNode(NodeHandle n)
Sets the PrevNode attribute of the RouteMessage object |
java.lang.String |
toString()
DESCRIBE THE METHOD |
Message |
unwrap()
Deprecated. use unwrap(MessageDeserializer) |
Message |
unwrap(MessageDeserializer md)
DESCRIBE THE METHOD |
Methods inherited from class rice.pastry.messaging.Message |
getDate, getSender, getSenderId, setPriority, setSender, stamp |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public transient NodeHandle nextHop
public static final short TYPE
Constructor Detail |
public RouteMessage(Id target, Message msg)
target
- this is id of the node the message will be routed to.msg
- the wrapped message.public RouteMessage(Id target, Message msg, SendOptions opts)
target
- this is id of the node the message will be routed to.msg
- the wrapped message.opts
- the send options for the message.public RouteMessage(NodeHandle dest, Message msg, SendOptions opts)
dest
- the node this message will be routed tomsg
- the wrapped message.opts
- the send options for the message.public RouteMessage(Id target, Message msg, NodeHandle firstHop)
target
- this is id of the node the message will be routed to.msg
- the wrapped message.firstHop
- the nodeHandle of the first hop destinationpublic RouteMessage(Id target, PRawMessage msg, NodeHandle firstHop, SendOptions opts)
target
- DESCRIBE THE PARAMETERmsg
- DESCRIBE THE PARAMETERfirstHop
- DESCRIBE THE PARAMETERopts
- DESCRIBE THE PARAMETERpublic RouteMessage(Id target, Message msg, NodeHandle firstHop, SendOptions opts)
target
- this is id of the node the message will be routed to.msg
- the wrapped message.firstHop
- the nodeHandle of the first hop destinationopts
- the send options for the message.public RouteMessage(Id target, int auxAddress, NodeHandle prev, InputBuffer buf, NodeHandleFactory nhf, PastryNode pn)
target
- DESCRIBE THE PARAMETERauxAddress
- DESCRIBE THE PARAMETERprev
- DESCRIBE THE PARAMETERbuf
- DESCRIBE THE PARAMETERnhf
- DESCRIBE THE PARAMETERpn
- DESCRIBE THE PARAMETERMethod Detail |
public Id getTarget()
public NodeHandle getPrevNode()
public NodeHandle getNextHop()
public byte getPriority()
getPriority
in interface Message
getPriority
in class Message
public int getDestination()
getDestination
in class Message
public SendOptions getOptions()
public Id getDestinationId()
getDestinationId
in interface RouteMessage
public NodeHandle getNextHopHandle()
getNextHopHandle
in interface RouteMessage
public Message getMessage()
getMessage
in interface RouteMessage
public Message getMessage(MessageDeserializer md) throws java.io.IOException
getMessage
in interface RouteMessage
md
- DESCRIBE THE PARAMETER
java.io.IOException
- DESCRIBE THE EXCEPTIONpublic short getType()
getType
in interface RawMessage
public int getAuxAddress()
public short getInternalType()
public void setPrevNode(NodeHandle n)
n
- The new PrevNode valuepublic void setNextHop(NodeHandle nh)
nh
- The new NextHop valuepublic void setDestinationId(Id id)
setDestinationId
in interface RouteMessage
id
- The new DestinationId valuepublic void setNextHopHandle(NodeHandle nextHop)
setNextHopHandle
in interface RouteMessage
nextHop
- The new NextHopHandle valuepublic void setMessage(Message message)
setMessage
in interface RouteMessage
message
- The new Message valuepublic void setMessage(RawMessage message)
setMessage
in interface RouteMessage
message
- The new Message valuepublic boolean routeMessage(NodeHandle localHandle)
localHandle
- DESCRIBE THE PARAMETER
public Message unwrap()
public java.lang.String toString()
public void serialize(OutputBuffer buf) throws java.io.IOException
serialize
in interface RawMessage
buf
- DESCRIBE THE PARAMETER
java.io.IOException
- DESCRIBE THE EXCEPTIONpublic Message unwrap(MessageDeserializer md) throws java.io.IOException
md
- DESCRIBE THE PARAMETER
java.io.IOException
- DESCRIBE THE EXCEPTIONpublic static RouteMessage build(InputBuffer buf, NodeHandleFactory nhf, PastryNode pn) throws java.io.IOException
buf
- nhf
- DESCRIBE THE PARAMETERpn
- DESCRIBE THE PARAMETER
java.io.IOException
- DESCRIBE THE EXCEPTION
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |