class MessageHeader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
MESSAGE_HEADER_LENGTH
The length of the standard message header in the MongoDB wire protocol.
|
private int |
messageLength |
private int |
opCode |
private int |
requestId |
private int |
responseTo |
Constructor and Description |
---|
MessageHeader(ByteBuf header,
int maxMessageLength) |
Modifier and Type | Method and Description |
---|---|
int |
getMessageLength()
Gets the total size of the message in bytes.
|
int |
getOpCode()
Gets the opcode
|
int |
getRequestId()
This is a client or database-generated identifier that uniquely identifies this message.
|
int |
getResponseTo()
Along with the requestID field in queries, clients can use this to associate query responses with the originating query.
|
public static final int MESSAGE_HEADER_LENGTH
private final int messageLength
private final int requestId
private final int responseTo
private final int opCode
MessageHeader(ByteBuf header, int maxMessageLength)
public int getMessageLength()
public int getRequestId()
responseTo
field in
responses, clients can use this to associate query responses with the originating query.public int getResponseTo()
public int getOpCode()