@ChannelHandler.Sharable
public final class BufferHandler
extends io.netty.channel.ChannelDuplexHandler
ChannelHandler
that converts does the following conversions:
Buffer
to ByteBuf
for writes.BufferHolder
to ByteBuf
for writes.ByteBuf
to Buffer
for reads.ByteBufHolder
to Buffer
for reads.ByteBuf
once converted to Buffer
.Modifier and Type | Field and Description |
---|---|
static io.netty.channel.ChannelDuplexHandler |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise) |
bind, close, connect, deregister, disconnect, flush, read
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)
channelRead
in interface io.netty.channel.ChannelInboundHandler
channelRead
in class io.netty.channel.ChannelInboundHandlerAdapter
public void write(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg, io.netty.channel.ChannelPromise promise)
write
in interface io.netty.channel.ChannelOutboundHandler
write
in class io.netty.channel.ChannelDuplexHandler