public class Message
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.util.SortedMap<java.lang.String,byte[]> |
annotations |
int |
annotations_size |
java.util.UUID |
correlation_id |
byte[] |
data |
int |
data_size |
int |
flags |
static int |
FLAGS_BATCH |
static int |
FLAGS_COMPRESSED |
static int |
FLAGS_CORR_ID |
static int |
FLAGS_EXCEPTION |
static int |
FLAGS_ITEMSTREAMRESULT |
static int |
FLAGS_KEEPSERIALIZED |
static int |
FLAGS_ONEWAY |
static int |
HEADER_SIZE |
static byte |
MSG_CONNECT |
static byte |
MSG_CONNECTFAIL |
static byte |
MSG_CONNECTOK |
static byte |
MSG_INVOKE |
static byte |
MSG_PING |
static byte |
MSG_RESULT |
int |
seq |
byte |
serializer_id |
static byte |
SERIALIZER_JSON |
static byte |
SERIALIZER_MARSHAL |
static byte |
SERIALIZER_MSGPACK |
static byte |
SERIALIZER_SERPENT |
byte |
type |
| Constructor and Description |
|---|
Message(byte msgType,
byte[] databytes,
byte serializer_id,
int flags,
int seq,
java.util.SortedMap<java.lang.String,byte[]> annotations,
java.util.UUID correlation_id)
construct a full wire message including data and annotations payloads.
|
Message(byte msgType,
byte serializer_id,
int flags,
int seq,
java.util.UUID correlation_id)
construct a header-type message, without data and annotations payload.
|
| Modifier and Type | Method and Description |
|---|---|
static Message |
from_header(byte[] header)
Parses a message header.
|
byte[] |
get_annotations_bytes() |
byte[] |
get_header_bytes() |
static Message |
recv(java.io.InputStream connection,
int[] requiredMsgTypes)
Receives a pyro message from a given connection.
|
byte[] |
to_bytes()
creates a byte stream containing the header followed by annotations (if any) followed by the data
|
static void |
TraceMessageRecv(int sequenceNr,
byte[] headerdata,
byte[] annotations,
byte[] data) |
static void |
TraceMessageSend(int sequenceNr,
byte[] headerdata,
byte[] annotations,
byte[] data) |
public static final int HEADER_SIZE
public static final byte MSG_CONNECT
public static final byte MSG_CONNECTOK
public static final byte MSG_CONNECTFAIL
public static final byte MSG_INVOKE
public static final byte MSG_RESULT
public static final byte MSG_PING
public static final int FLAGS_EXCEPTION
public static final int FLAGS_COMPRESSED
public static final int FLAGS_ONEWAY
public static final int FLAGS_BATCH
public static final int FLAGS_ITEMSTREAMRESULT
public static final int FLAGS_KEEPSERIALIZED
public static final int FLAGS_CORR_ID
public static final byte SERIALIZER_SERPENT
public static final byte SERIALIZER_MARSHAL
public static final byte SERIALIZER_JSON
public static final byte SERIALIZER_MSGPACK
public byte type
public int flags
public byte[] data
public int data_size
public int annotations_size
public java.util.UUID correlation_id
public byte serializer_id
public int seq
public java.util.SortedMap<java.lang.String,byte[]> annotations
public Message(byte msgType,
byte serializer_id,
int flags,
int seq,
java.util.UUID correlation_id)
public Message(byte msgType,
byte[] databytes,
byte serializer_id,
int flags,
int seq,
java.util.SortedMap<java.lang.String,byte[]> annotations,
java.util.UUID correlation_id)
public byte[] to_bytes()
public byte[] get_header_bytes()
public byte[] get_annotations_bytes()
public static Message from_header(byte[] header)
public static Message recv(java.io.InputStream connection, int[] requiredMsgTypes) throws java.io.IOException
java.io.IOExceptionpublic static void TraceMessageSend(int sequenceNr,
byte[] headerdata,
byte[] annotations,
byte[] data)
throws java.io.IOException
java.io.IOExceptionpublic static void TraceMessageRecv(int sequenceNr,
byte[] headerdata,
byte[] annotations,
byte[] data)
throws java.io.IOException
java.io.IOExceptionCopyright © 2020. All Rights Reserved.