类 AbstractNioBufferReactorNettyCodec<P>
- java.lang.Object
- org.springframework.messaging.tcp.reactor.AbstractNioBufferReactorNettyCodec<P>
- 类型参数:
P
- the message payload type
- 所有已实现的接口:
ReactorNettyCodec<P>
- 直接已知子类:
StompReactorNettyCodec
public abstract class AbstractNioBufferReactorNettyCodec<P> extends Object implements ReactorNettyCodec<P>
Convenient base class forReactorNettyCodec
implementations that need to work with NIOByteBuffers
.- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 构造器 说明 AbstractNioBufferReactorNettyCodec()
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 Collection<Message<P>>
decode(io.netty.buffer.ByteBuf inputBuffer)
Decode the inputByteBuf
into one or moreMessages
.protected abstract List<Message<P>>
decodeInternal(ByteBuffer nioBuffer)
void
encode(Message<P> message, io.netty.buffer.ByteBuf outputBuffer)
Encode the givenMessage
to the outputByteBuf
.protected abstract ByteBuffer
encodeInternal(Message<P> message)
构造器详细资料
AbstractNioBufferReactorNettyCodec
public AbstractNioBufferReactorNettyCodec()
方法详细资料
decode
public Collection<Message<P>> decode(io.netty.buffer.ByteBuf inputBuffer)
从接口复制的说明:ReactorNettyCodec
Decode the inputByteBuf
into one or moreMessages
.- 指定者:
decode
在接口中ReactorNettyCodec<P>
- 参数:
inputBuffer
- the input buffer to decode from- 返回:
- 0 or more decoded messages
encode
public void encode(Message<P> message, io.netty.buffer.ByteBuf outputBuffer)
从接口复制的说明:ReactorNettyCodec
Encode the givenMessage
to the outputByteBuf
.- 指定者:
encode
在接口中ReactorNettyCodec<P>
- 参数:
message
- the message to encodeoutputBuffer
- the buffer to write to
decodeInternal
protected abstract List<Message<P>> decodeInternal(ByteBuffer nioBuffer)
encodeInternal
protected abstract ByteBuffer encodeInternal(Message<P> message)