Package io.kroxylicious.proxy.frame
Interface Frame
- All Known Subinterfaces:
RequestFrame,ResponseFrame
- All Known Implementing Classes:
BareSaslRequest,BareSaslResponse,DecodedFrame,DecodedRequestFrame,DecodedResponseFrame,InternalRequestFrame,InternalResponseFrame,OpaqueFrame,OpaqueRequestFrame,OpaqueResponseFrame
public interface Frame
A frame in the Kafka protocol, which may or may not be fully decoded.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNumber of bytes required for storing the frame length. -
Method Summary
Modifier and TypeMethodDescriptionshortapiKeyId()Api key id of this frame.shortApi version of this frame.intThe correlation id.voidencode(ByteBufAccessor out) Write the frame, including the size prefix, to the given bufferintEstimate the expected encoded size in bytes of thisFrame.
In particular, written data byencode(ByteBufAccessor)should be the same as reported by this method.booleantrue if this frame is decoded, false otherwise
-
Field Details
-
FRAME_SIZE_LENGTH
static final int FRAME_SIZE_LENGTHNumber of bytes required for storing the frame length.- See Also:
-
-
Method Details
-
estimateEncodedSize
int estimateEncodedSize()Estimate the expected encoded size in bytes of thisFrame.
In particular, written data byencode(ByteBufAccessor)should be the same as reported by this method. -
encode
Write the frame, including the size prefix, to the given buffer- Parameters:
out- The output buffer
-
correlationId
int correlationId()The correlation id.- Returns:
- The correlation id.
-
apiKeyId
short apiKeyId()Api key id of this frame. -
apiVersion
short apiVersion()Api version of this frame. -
isDecoded
boolean isDecoded()true if this frame is decoded, false otherwise
-