Top Description Methods
org.springframework.messaging.tcp.reactor

public Interface ReactorNettyCodec<P>

Known Direct Implementers
org.springframework.messaging.tcp.reactor.AbstractNioBufferReactorNettyCodec
Type Parameters
<P>
the message payload type
Imports
java.util.Collection, java.util.function.BiConsumer, .Function, io.netty.buffer.ByteBuf, org.springframework.messaging.Message

Simple holder for a decoding Function and an encoding BiConsumer to use with Reactor Netty.
Author
Rossen Stoyanchev
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public Collection<Message<P>>

Returns:

0 or more decoded messages
decode
(ByteBuf
the input buffer to decode from
inputBuffer
)

Decode the input ByteBuf into one or more Messages.

public void
encode(Message<P>
the message to encode
message
,
ByteBuf
the buffer to write to
outputBuffer
)

Encode the given Message to the output ByteBuf.

Method Detail

decodeback to summary
public Collection<Message<P>> decode(ByteBuf inputBuffer)

Decode the input ByteBuf into one or more Messages.

Parameters
inputBuffer:ByteBuf

the input buffer to decode from

Returns:Collection<Message<P>>

0 or more decoded messages

encodeback to summary
public void encode(Message<P> message, ByteBuf outputBuffer)

Encode the given Message to the output ByteBuf.

Parameters
message:Message<P>

the message to encode

outputBuffer:ByteBuf

the buffer to write to