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

public abstract Class AbstractNioBufferReactorNettyCodec<P>

extends Object
implements ReactorNettyCodec<P>
Class Inheritance
All Implemented Interfaces
org.springframework.messaging.tcp.reactor.ReactorNettyCodec
Known Direct Subclasses
org.springframework.messaging.simp.stomp.StompReactorNettyCodec
Type Parameters
<P>
the message payload type
Imports
java.nio.ByteBuffer, java.util.Collection, .List, io.netty.buffer.ByteBuf, org.springframework.messaging.Message

Convenient base class for ReactorNettyCodec implementations that need to work with NIO ByteBuffers.
Author
Rossen Stoyanchev
Since
5.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Collection<Message<P>>
decode(ByteBuf
the input buffer to decode from
inputBuffer
)

Implements org.springframework.messaging.tcp.reactor.ReactorNettyCodec.decode.

Decode the input ByteBuf into one or more Messages.
protected abstract List<Message<P>>
public void
encode(Message<P>
the message to encode
message
,
ByteBuf
the buffer to write to
outputBuffer
)

Implements org.springframework.messaging.tcp.reactor.ReactorNettyCodec.encode.

Encode the given Message to the output ByteBuf.
protected abstract ByteBuffer
encodeInternal(Message<P> message)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractNioBufferReactorNettyCodecback to summary
public AbstractNioBufferReactorNettyCodec()

Method Detail

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

Implements org.springframework.messaging.tcp.reactor.ReactorNettyCodec.decode.

Doc from org.springframework.messaging.tcp.reactor.ReactorNettyCodec.decode.

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

Annotations
@Override
decodeInternalback to summary
protected abstract List<Message<P>> decodeInternal(ByteBuffer nioBuffer)
encodeback to summary
public void encode(Message<P> message, ByteBuf outputBuffer)

Implements org.springframework.messaging.tcp.reactor.ReactorNettyCodec.encode.

Doc from org.springframework.messaging.tcp.reactor.ReactorNettyCodec.encode.

Encode the given Message to the output ByteBuf.

Parameters
message:Message<P>

the message to encode

outputBuffer:ByteBuf

the buffer to write to

Annotations
@Override
encodeInternalback to summary
protected abstract ByteBuffer encodeInternal(Message<P> message)