Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.pastry.routing
Class RouteMessage

    java.lang.Object
      rice.pastry.messaging.Message
          rice.pastry.routing.RouteMessage

All Implemented Interfaces:
  RouteMessage, java.io.Serializable

public class RouteMessage
extends Message
implements java.io.Serializable, RouteMessage

A route message contains a pastry message that has been wrapped to be sent to another pastry node.

Version:
  $Id: RouteMessage.java,v 1.28 2005/06/07 22:02:13 jeffh Exp $
Author:
  Andrew Ladd
See Also:
  Serialized Form

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, setPriority, setSender, stamp`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### nextHop

    public transient NodeHandle nextHop

  DESCRIBE THE FIELD

Constructor Detail

### RouteMessage

    public RouteMessage(Id target,
                        Message msg,
                        Credentials cred)

  Constructor.

Parameters:
  `target` - this is id of the node the message will be routed to.
  `msg` - the wrapped message.
  `cred` - the credentials for the message.

### RouteMessage

    public RouteMessage(Id target,
                        Message msg,
                        Credentials cred,
                        SendOptions opts)

  Constructor.

Parameters:
  `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.

### RouteMessage

    public RouteMessage(NodeHandle dest,
                        Message msg,
                        Credentials cred,
                        SendOptions opts,
                        Address aux)

  Constructor.

Parameters:
  `dest` - the node this 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.

### RouteMessage

    public RouteMessage(Id target,
                        Message msg,
                        Credentials cred,
                        Address aux)

  Constructor.

Parameters:
  `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.

### RouteMessage

    public RouteMessage(Id target,
                        Message msg,
                        Credentials cred,
                        SendOptions opts,
                        Address aux)

  Constructor.

Parameters:
  `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.

### RouteMessage

    public RouteMessage(Id target,
                        Message msg,
                        NodeHandle firstHop,
                        Address aux)

  Constructor.

Parameters:
  `target` - this is id of the node the message will be routed to.
  `msg` - the wrapped message.
  `firstHop` - the nodeHandle of the first hop destination
  `aux` - an auxilary address which the message after each hop.

Method Detail

### getTarget

    public Id getTarget()

  Gets the target node id of this message.

  Returns:
    the target node id.

### getPrevNode

    public NodeHandle getPrevNode()

  Gets the PrevNode attribute of the RouteMessage object

  Returns:
    The PrevNode value

### getNextHop

    public NodeHandle getNextHop()

  Gets the NextHop attribute of the RouteMessage object

  Returns:
    The NextHop value

### getPriority

    public int getPriority()

  Get priority

  Overrides:
    `getPriority` in class `Message`
  Returns:
    the priority of this message.

### getDestination

    public Address getDestination()

  Get receiver address.

  Overrides:
    `getDestination` in class `Message`
  Returns:
    the address.

### getOptions

    public SendOptions getOptions()

  Get transmission options.

  Returns:
    the options.

### getDestinationId

    public Id getDestinationId()

  Gets the DestinationId attribute of the RouteMessage object

  Specified by:
    `getDestinationId` in interface `RouteMessage`
  Returns:
    The DestinationId value

### getNextHopHandle

    public NodeHandle getNextHopHandle()

  Gets the NextHopHandle attribute of the RouteMessage object

  Specified by:
    `getNextHopHandle` in interface `RouteMessage`
  Returns:
    The NextHopHandle value

### getMessage

    public Message getMessage()

  Gets the Message attribute of the RouteMessage object

  Specified by:
    `getMessage` in interface `RouteMessage`
  Returns:
    The Message value

### setPrevNode

    public void setPrevNode(NodeHandle n)

  Sets the PrevNode attribute of the RouteMessage object

  Parameters:
    `n` - The new PrevNode value

### setNextHop

    public void setNextHop(NodeHandle nh)

  Sets the NextHop attribute of the RouteMessage object

  Parameters:
    `nh` - The new NextHop value

### setDestinationId

    public void setDestinationId(Id id)

  Sets the DestinationId attribute of the RouteMessage object

  Specified by:
    `setDestinationId` in interface `RouteMessage`
  Parameters:
    `id` - The new DestinationId value

### setNextHopHandle

    public void setNextHopHandle(NodeHandle nextHop)

  Sets the NextHopHandle attribute of the RouteMessage object

  Specified by:
    `setNextHopHandle` in interface `RouteMessage`
  Parameters:
    `nextHop` - The new NextHopHandle value

### setMessage

    public void setMessage(Message message)

  Sets the Message attribute of the RouteMessage object

  Specified by:
    `setMessage` in interface `RouteMessage`
  Parameters:
    `message` - The new Message value

### routeMessage

    public boolean routeMessage(NodeHandle localHandle)

  Routes the messages if the next hop has been set up.

  Parameters:
    `localHandle` - DESCRIBE THE PARAMETER
  Returns:
    true if the message got routed, false otherwise.

### unwrap

    public Message unwrap()

  The wrapped message.

  Returns:
    the wrapped message.

### toString

    public java.lang.String toString()

  DESCRIBE THE METHOD

  Returns:
    DESCRIBE THE RETURN VALUE

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.