public final class RSocketLengthCodec extends LengthFieldBasedFrameDecoder
LengthFieldBasedFrameDecoder that encapsulates the
RSocket-specific frame length header details.ByteToMessageDecoder.CumulatorChannelHandler.SharableCOMPOSITE_CUMULATOR, MERGE_CUMULATOR| Constructor and Description |
|---|
RSocketLengthCodec()
Creates a new instance of the decoder, specifying the RSocket frame length header size.
|
RSocketLengthCodec(int maxFrameLength)
Creates a new instance of the decoder, specifying the RSocket frame length header size.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
decode(ByteBuf in)
Simplified non-netty focused decode usage.
|
decode, decode, extractFrame, getUnadjustedFrameLengthactualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredchannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtensureNotSharable, handlerAdded, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAddedpublic RSocketLengthCodec()
public RSocketLengthCodec(int maxFrameLength)
maxFrameLength - maximum allowed frame length for incoming rsocket framespublic Object decode(ByteBuf in) throws Exception
in - the input buffer to read data from.Exception - if any error happens.LengthFieldBasedFrameDecoder.decode(ChannelHandlerContext, ByteBuf)