public class Frame extends Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
beta
Whether the frame was decoded from a payload that has the
USE_BETA flag. |
int |
compressedSize
The binary size of the compressed frame (including the header).
|
Map<String,ByteBuffer> |
customPayload |
Message |
message |
static Map<String,ByteBuffer> |
NO_PAYLOAD |
int |
protocolVersion |
int |
size
The binary size of the frame in bytes (including the header).
|
int |
streamId |
boolean |
tracing
Whether the frame was decoded from a payload that has the
TRACING flag. |
UUID |
tracingId |
List<String> |
warnings |
| Constructor and Description |
|---|
Frame(int protocolVersion,
boolean beta,
int streamId,
boolean tracing,
UUID tracingId,
int size,
int compressedSize,
Map<String,ByteBuffer> customPayload,
List<String> warnings,
Message message)
This constructor is mainly intended for internal use by the frame codec.
|
Frame(int protocolVersion,
boolean beta,
int streamId,
boolean tracing,
UUID tracingId,
Map<String,ByteBuffer> customPayload,
List<String> warnings,
Message message)
Deprecated.
maintain compatibility while Simulacron upgrades to the latest native-protocol.
|
| Modifier and Type | Method and Description |
|---|---|
static Frame |
forRequest(int protocolVersion,
int streamId,
boolean tracing,
Map<String,ByteBuffer> customPayload,
Message message) |
static Frame |
forResponse(int protocolVersion,
int streamId,
UUID tracingId,
Map<String,ByteBuffer> customPayload,
List<String> warnings,
Message message) |
public static final Map<String,ByteBuffer> NO_PAYLOAD
public final int protocolVersion
public final boolean beta
USE_BETA flag. For encoding
this is ignored, the codec will set the flag if protocolVersion ==
ProtocolConstants.Version.Beta, regardless of this field.public final int streamId
public final UUID tracingId
public final boolean tracing
TRACING flag. For encoding
this is ignored, the codec will set the flag if the tracingId != null, regardless of
this field.public final int size
This is exposed for information purposes, and only for instances returned by the frame decoder. Otherwise, it is set to -1.
public final int compressedSize
This is exposed for information purposes, and only for instances returned by the frame decoder, if compression is enabled and the frame was compressed when it was received. Otherwise, it is set to -1.
public final Map<String,ByteBuffer> customPayload
public final Message message
public Frame(int protocolVersion,
boolean beta,
int streamId,
boolean tracing,
UUID tracingId,
int size,
int compressedSize,
Map<String,ByteBuffer> customPayload,
List<String> warnings,
Message message)
forRequest(int, int, boolean, Map, Message) or forResponse(int, int, UUID, Map, List, Message).@Deprecated public Frame(int protocolVersion, boolean beta, int streamId, boolean tracing, UUID tracingId, Map<String,ByteBuffer> customPayload, List<String> warnings, Message message)
public static Frame forRequest(int protocolVersion, int streamId, boolean tracing, Map<String,ByteBuffer> customPayload, Message message)
Copyright © 2017–2019. All rights reserved.