shaohua_project.sweep.routing
Class NZMessage

java.lang.Object
  extended by shaohua_project.sweep.routing.NZMessage
All Implemented Interfaces:
JistAPI.Timeless, Message

public class NZMessage
extends java.lang.Object
implements Message


Field Summary
 int queryId
           
 long s_seq
           
 long timeSent
           
 
Fields inherited from interface jist.swans.misc.Message
NULL
 
Constructor Summary
NZMessage()
          Creates a new instance of NZMessage
NZMessage(int queryId, long s_seq, long timeSent, Message payload)
           
 
Method Summary
 NZMessage copy()
           
 void getBytes(byte[] b, int offset)
          Store packet into byte array.
 Location2D[] getPath()
           
 Message getPayload()
           
 Query getQuery()
           
 int getSize()
          Return packet size or Constants.ZERO_WIRE_SIZE.
 Location2D getSourceLocation()
           
 void setPath(Location2D[] path)
           
 void setQuery(Query newQuery)
           
 void setSourceLocation(Location2D loc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queryId

public int queryId

s_seq

public long s_seq

timeSent

public long timeSent
Constructor Detail

NZMessage

public NZMessage(int queryId,
                 long s_seq,
                 long timeSent,
                 Message payload)

NZMessage

public NZMessage()
Creates a new instance of NZMessage

Method Detail

getPath

public Location2D[] getPath()

setPath

public void setPath(Location2D[] path)

getPayload

public Message getPayload()

getSourceLocation

public Location2D getSourceLocation()

setSourceLocation

public void setSourceLocation(Location2D loc)

getQuery

public Query getQuery()

setQuery

public void setQuery(Query newQuery)

getSize

public int getSize()
Return packet size or Constants.ZERO_WIRE_SIZE.

Specified by:
getSize in interface Message
Returns:
packet size [in bytes]

getBytes

public void getBytes(byte[] b,
                     int offset)
Store packet into byte array.

Specified by:
getBytes in interface Message
Parameters:
b - destination byte array
offset - byte array starting offset

copy

public NZMessage copy()