ostore.tapestry.api
Class TapestryRouteMsg

java.lang.Object
  |
  +--ostore.tapestry.api.TapestryRouteMsg
All Implemented Interfaces:
QueueElementIF, QuickSerializable
Direct Known Subclasses:
DHMessage, PingMsg, PongMsg, RepublishRequestMsg, SimulatedReadResp, TapestryHowto.Ping, TapestryHowto.Pong, TapestryMacRouteMsg, TestReadyMsg

public abstract class TapestryRouteMsg
extends Object
implements QueueElementIF, QuickSerializable

Messages sent from one OceanStore machine to any other. To send a message from one OceanStore machine to any other, one simply inherits from this class, filling in the proper serialization code for the inherited class's data. (The Tapestry stage will take care of the fields in this class itself.)

Implementation-wise, this is simply a route-to-root operation.


Field Summary
 int hopCount
          Number of hops taken by the message on its way to the application
 boolean inbound
          Whether this message is being received (true) or sent (false).
 SecureHash peer
          If inbound, the sender; if ! inbound the intended recipient.
 int qos
          The delivery qos of this msg.
 int TTL
          Number of hops this message should take before delivering payload.
 
Constructor Summary
protected TapestryRouteMsg()
          Empty constructor.
protected TapestryRouteMsg(InputBuffer buffer)
           
protected TapestryRouteMsg(SecureHash peer)
          Construct with the given destination.
 
Method Summary
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

peer

public SecureHash peer
If inbound, the sender; if ! inbound the intended recipient.

inbound

public boolean inbound
Whether this message is being received (true) or sent (false).

hopCount

public int hopCount
Number of hops taken by the message on its way to the application

TTL

public int TTL
Number of hops this message should take before delivering payload.

qos

public int qos
The delivery qos of this msg.
Constructor Detail

TapestryRouteMsg

protected TapestryRouteMsg(SecureHash peer)
Construct with the given destination. Use for new outbound messages.

TapestryRouteMsg

protected TapestryRouteMsg()
Empty constructor. For use by derived types when reconstructing themselves from a byte array.

TapestryRouteMsg

protected TapestryRouteMsg(InputBuffer buffer)
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.
Specified by:
serialize in interface QuickSerializable
Following copied from interface: ostore.util.QuickSerializable
Parameters:
buffer - the output buffer to add the object to