Package io.netty.handler.codec.protobuf
Class ProtobufVarint32FrameDecoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.ByteToMessageDecoder
-
- io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class ProtobufVarint32FrameDecoder extends io.netty.handler.codec.ByteToMessageDecoderA decoder that splits the receivedByteBufs 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
-
-
Constructor Summary
Constructors Constructor Description ProtobufVarint32FrameDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddecode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> out)-
Methods inherited from class io.netty.handler.codec.ByteToMessageDecoder
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharable
-
-