Top Description Constructors Methods
io.rsocket.transport.netty

public final Class RSocketLengthCodec

extends LengthFieldBasedFrameDecoder
Class Inheritance
Static Imports
io.rsocket.frame.FrameLengthCodec.FRAME_LENGTH_MASK, .FrameLengthCodec.FRAME_LENGTH_SIZE

An extension to the Netty LengthFieldBasedFrameDecoder that encapsulates the RSocket-specific frame length header details.

Constructor Summary

AccessConstructor and Description
public
RSocketLengthCodec()

Creates a new instance of the decoder, specifying the RSocket frame length header size.

public
RSocketLengthCodec(int
maximum allowed frame length for incoming rsocket frames
maxFrameLength
)

Creates a new instance of the decoder, specifying the RSocket frame length header size.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

decoded buffer or null is none available.
decode
(ByteBuf
the input buffer to read data from.
in
)

Simplified non-netty focused decode usage.

Inherited from io.netty.handler.codec.LengthFieldBasedFrameDecoder:
decodedecodeextractFramegetUnadjustedFrameLength

Constructor Detail

RSocketLengthCodecback to summary
public RSocketLengthCodec()

Creates a new instance of the decoder, specifying the RSocket frame length header size.

RSocketLengthCodecback to summary
public RSocketLengthCodec(int maxFrameLength)

Creates a new instance of the decoder, specifying the RSocket frame length header size.

Parameters
maxFrameLength:int

maximum allowed frame length for incoming rsocket frames

Method Detail

decodeback to summary
public Object decode(ByteBuf in) throws Exception

Simplified non-netty focused decode usage.

Parameters
in:ByteBuf

the input buffer to read data from.

Returns:Object

decoded buffer or null is none available.

Exceptions
Exception:
if any error happens.
See Also
decode(ChannelHandlerContext, ByteBuf)