|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.pastry.messaging.Message
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 |
Fields inherited from class rice.pastry.messaging.Message |
DEFAULT_PRIORITY_LEVEL |
Constructor Summary | |
RouteMessage(Id target,
Message msg,
Credentials cred)
Constructor. |
|
RouteMessage(Id target,
Message msg,
Credentials cred,
Address aux)
Constructor. |
|
RouteMessage(Id target,
Message msg,
Credentials cred,
SendOptions opts)
Constructor. |
|
RouteMessage(Id target,
Message msg,
Credentials cred,
SendOptions opts,
Address aux)
Constructor. |
|
RouteMessage(Id target,
Message msg,
NodeHandle firstHop,
Address aux)
Constructor. |
|
RouteMessage(NodeHandle dest,
Message msg,
Credentials cred,
SendOptions opts,
Address aux)
Constructor. |
Method Summary | |
Address |
getDestination()
Get receiver address. |
Id |
getDestinationId()
Gets the DestinationId attribute of the RouteMessage object |
Message |
getMessage()
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 |
int |
getPriority()
Get priority |
Id |
getTarget()
Gets the target node id of this message. |
boolean |
routeMessage(NodeHandle localHandle)
Routes the messages if the next hop has been set up. |
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 |
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()
The wrapped message. |
Methods inherited from class rice.pastry.messaging.Message |
getCredentials, getDate, getSender, getSenderId, getStream, 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
Constructor Detail |
public RouteMessage(Id target, Message msg, Credentials cred)
target
- this is id of the node the message will be routed to.msg
- the wrapped message.cred
- the credentials for the message.public RouteMessage(Id target, Message msg, Credentials cred, SendOptions opts)
target
- this is id of the node the message will be routed to.msg
- the wrapped message.cred
- the credentials for the message.opts
- the send options for the message.public RouteMessage(NodeHandle dest, Message msg, Credentials cred, SendOptions opts, Address aux)
dest
- the node this message will be routed tomsg
- the wrapped message.cred
- the credentials for the message.opts
- the send options for the message.aux
- an auxilary address which the message after each hop.public RouteMessage(Id target, Message msg, Credentials cred, Address aux)
target
- this is id of the node the message will be routed to.msg
- the wrapped message.cred
- the credentials for the message.aux
- an auxilary address which the message after each hop.public RouteMessage(Id target, Message msg, Credentials cred, SendOptions opts, Address aux)
target
- this is id of the node the message will be routed to.msg
- the wrapped message.cred
- the credentials for the message.opts
- the send options for the message.aux
- an auxilary address which the message after each hop.public RouteMessage(Id target, Message msg, NodeHandle firstHop, Address aux)
target
- this is id of the node the message will be routed to.msg
- the wrapped message.firstHop
- the nodeHandle of the first hop destinationaux
- an auxilary address which the message after each hop.Method Detail |
public Id getTarget()
public NodeHandle getPrevNode()
public NodeHandle getNextHop()
public int getPriority()
getPriority
in class Message
public Address 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 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 boolean routeMessage(NodeHandle localHandle)
localHandle
- DESCRIBE THE PARAMETER
public Message unwrap()
public java.lang.String toString()
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |