Class ProtobufVarint32FrameDecoder

All Implemented Interfaces:
ChannelHandler, ChannelInboundHandler

public class ProtobufVarint32FrameDecoder extends ByteToMessageDecoder
A decoder that splits the received ByteBufs dynamically by the value of the Google Protocol Buffers Base 128 Varints integer length field in the message. For example:
BEFORE DECODE (302 bytes)       AFTER DECODE (300 bytes)
+--------+---------------+      +---------------+
| Length | Protobuf Data |----->| Protobuf Data |
| 0xAC02 |  (300 bytes)  |      |  (300 bytes)  |
+--------+---------------+      +---------------+
See Also:
  • CodedInputStream
  • CodedInputByteBufferNano