sidnet.stack.users.triggers_project.routing
Class MessageP2P

java.lang.Object
  extended by sidnet.stack.users.triggers_project.routing.MessageP2P
All Implemented Interfaces:
JistAPI.Timeless, Message

public class MessageP2P
extends java.lang.Object
implements Message


Field Summary
 Location2D dstLocation
           
 Payload payload
           
 
Fields inherited from interface jist.swans.misc.Message
NULL
 
Constructor Summary
MessageP2P(Location2D dstLocation, Payload payload)
           
 
Method Summary
 void getBytes(byte[] b, int offset)
          Store packet into byte array.
 int getSize()
          Return packet size or Constants.ZERO_WIRE_SIZE.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dstLocation

public Location2D dstLocation

payload

public Payload payload
Constructor Detail

MessageP2P

public MessageP2P(Location2D dstLocation,
                  Payload payload)
Method Detail

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