jist.swans.misc
Class MessageNest

java.lang.Object
  extended by jist.swans.misc.MessageNest
All Implemented Interfaces:
JistAPI.Timeless, Message

public class MessageNest
extends java.lang.Object
implements Message

Implementation of Message interface that performs message nesting (header, data).

Since:
SWANS1.0

Field Summary
 
Fields inherited from interface jist.swans.misc.Message
NULL
 
Constructor Summary
MessageNest(Message header, Message data)
          Created new nested message.
 
Method Summary
 void getBytes(byte[] msg, 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
 

Constructor Detail

MessageNest

public MessageNest(Message header,
                   Message data)
Created new nested message.

Parameters:
header - nested message header
data - nested message body
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[] msg,
                     int offset)
Store packet into byte array.

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