|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectist.palcom.collections.Link
ist.palcom.mal.MessageHeaderNode
public class MessageHeaderNode
| Field Summary | |
|---|---|
static byte |
FUNCTION_CLOSE
|
static byte |
FUNCTION_MESSAGE_OVER_CONNECTION
|
static byte |
FUNCTION_NONE
Special value used when function has not been set |
static byte |
FUNCTION_OPEN
|
static byte |
FUNCTION_OPEN_REPLY
|
static byte |
FUNCTION_RADIOCASTED
|
static byte |
FUNCTION_RE_OPEN
|
static byte |
FUNCTION_USER_ID
|
static byte |
NODE_FORMAT_ACKMESSAGE
The Reliable Ack message node 'A'. |
static byte |
NODE_FORMAT_CHOPPED
The Chopped message node '-'. |
static byte |
NODE_FORMAT_CONNECTION
The Connection message node 'c'. |
static byte |
NODE_FORMAT_GROUP_JOIN
The group join message node 'g'. |
static byte |
NODE_FORMAT_GROUP_LEAVE
The group leave message node 'q'. |
static byte |
NODE_FORMAT_GROUP_MESSAGE
The group message node 'G'. |
static byte |
NODE_FORMAT_HBINFOREPLY
The HBInfoReply message node 'I'. |
static byte |
NODE_FORMAT_HBINFOREQUEST
The HBInfoRequest message node 'i'. |
static byte |
NODE_FORMAT_HEARTATTACK
The heartattack message node 'X'. |
static byte |
NODE_FORMAT_HEARTBEAT
The heartbeat message node 'h'. |
static byte |
NODE_FORMAT_HEARTBEATACK
The heartbeat ack message node 'H'. |
static byte |
NODE_FORMAT_MARK
The mark message node 'm'. |
static byte |
NODE_FORMAT_NONE
Special value used before a format has been assigned |
static byte |
NODE_FORMAT_PUBLISH
The publish message node 'P'. |
static byte |
NODE_FORMAT_RELIABLE
The Reliable message node 'R'. |
static byte |
NODE_FORMAT_RESENDMESSAGE
The Reliable resend message node 'B'. |
static byte |
NODE_FORMAT_ROUTINGR
The RoutingR message node 'r'. |
static byte |
NODE_FORMAT_ROUTINGS
The RoutingS message node 's'. |
static byte |
NODE_FORMAT_SINGLE_SHOT
The single-shot message node 'S'. |
static byte |
NODE_FORMAT_VERSION
The FormatVersion message node 'v'. |
| Constructor Summary | |
|---|---|
MessageHeaderNode(byte formatIdentifier)
Constructs a message header node with no data. |
|
MessageHeaderNode(byte[] data,
int offset,
int length)
Constructs a message header node from an array with data. |
|
MessageHeaderNode(byte formatIdentifier,
byte functionIdentifier,
java.lang.String[] data)
Constructs a message header node from the parameters. |
|
MessageHeaderNode(byte formatIdentifier,
java.lang.String[] data)
Constructs a message header node from the parameters with no function identifier. |
|
| Method Summary | |
|---|---|
MessageHeaderNode |
getCopy()
|
java.lang.String[] |
getData()
|
byte |
getFormatIdentifier()
|
byte |
getFunctionIdentifier()
|
int |
getLength()
Returns the length of the data part of the node without the header part. |
static int |
getMessageDataNodeOffset(byte[] message)
Returns the offset where the message data node or nodes start in a byte array containing an entire message. |
int |
getTotalLength()
Returns the total length of the message header node, including the length of the header with length and format. |
byte[] |
toByteArray()
|
java.lang.String |
toString()
|
| Methods inherited from class ist.palcom.collections.Link |
|---|
getNext, getPrev |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final byte NODE_FORMAT_NONE
public static final byte NODE_FORMAT_HEARTBEAT
public static final byte NODE_FORMAT_HEARTBEATACK
public static final byte NODE_FORMAT_HEARTATTACK
public static final byte NODE_FORMAT_HBINFOREQUEST
public static final byte NODE_FORMAT_HBINFOREPLY
public static final byte NODE_FORMAT_VERSION
public static final byte NODE_FORMAT_CONNECTION
public static final byte NODE_FORMAT_ROUTINGR
public static final byte NODE_FORMAT_ROUTINGS
public static final byte NODE_FORMAT_MARK
public static final byte NODE_FORMAT_RELIABLE
public static final byte NODE_FORMAT_ACKMESSAGE
public static final byte NODE_FORMAT_RESENDMESSAGE
public static final byte NODE_FORMAT_CHOPPED
public static final byte NODE_FORMAT_SINGLE_SHOT
public static final byte NODE_FORMAT_PUBLISH
public static final byte NODE_FORMAT_GROUP_JOIN
public static final byte NODE_FORMAT_GROUP_MESSAGE
public static final byte NODE_FORMAT_GROUP_LEAVE
public static final byte FUNCTION_NONE
public static final byte FUNCTION_RADIOCASTED
public static final byte FUNCTION_OPEN
public static final byte FUNCTION_OPEN_REPLY
public static final byte FUNCTION_CLOSE
public static final byte FUNCTION_RE_OPEN
public static final byte FUNCTION_MESSAGE_OVER_CONNECTION
public static final byte FUNCTION_USER_ID
| Constructor Detail |
|---|
public MessageHeaderNode(byte[] data,
int offset,
int length)
data - The array with dataoffset - The offset to start parsing fromlength - Parse the message to at most length bytes.public MessageHeaderNode(byte formatIdentifier)
formatIdentifier - The format of the node
public MessageHeaderNode(byte formatIdentifier,
java.lang.String[] data)
formatIdentifier - The format of the nodedata - The data part of the node
public MessageHeaderNode(byte formatIdentifier,
byte functionIdentifier,
java.lang.String[] data)
formatIdentifier - The format of the nodefunctionIdentifier - The function of the nodedata - The data part of the node| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String[] getData()
public byte getFormatIdentifier()
public byte getFunctionIdentifier()
public int getLength()
public int getTotalLength()
public byte[] toByteArray()
public static int getMessageDataNodeOffset(byte[] message)
message - The message to find the data node part in.
public MessageHeaderNode getCopy()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||