public abstract class ChannelInboundByteHandlerAdapter extends ChannelInboundHandlerAdapter implements ChannelInboundByteHandler
ChannelInboundHandlerAdapter
which should be extended by the user to
get notified once more data is ready to get consumed from the inbound ByteBuf
.
This implementation is a good starting point for must users.ChannelHandler.Sharable
Constructor and Description |
---|
ChannelInboundByteHandlerAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
inboundBufferUpdated(ChannelHandlerContext ctx)
Does nothing by default.
|
abstract void |
inboundBufferUpdated(ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in)
Callback which will get notifed once the given
ByteBuf received more data to read. |
io.netty.buffer.ByteBuf |
newInboundBuffer(ChannelHandlerContext ctx)
Create a new unpooled
ByteBuf by default. |
afterAdd, afterRemove, beforeAdd, beforeRemove, channelActive, channelInactive, channelRegistered, channelUnregistered, exceptionCaught, userEventTriggered
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
channelActive, channelInactive, channelRegistered, channelUnregistered
afterAdd, afterRemove, beforeAdd, beforeRemove, exceptionCaught, userEventTriggered
public io.netty.buffer.ByteBuf newInboundBuffer(ChannelHandlerContext ctx) throws Exception
ByteBuf
by default. Sub-classes may override this to offer a more
optimized implementation.newInboundBuffer
in interface ChannelInboundByteHandler
newInboundBuffer
in interface ChannelInboundHandler
Exception
public final void inboundBufferUpdated(ChannelHandlerContext ctx) throws Exception
ChannelInboundHandlerAdapter
inboundBufferUpdated
in interface ChannelStateHandler
inboundBufferUpdated
in class ChannelInboundHandlerAdapter
Exception
public abstract void inboundBufferUpdated(ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in) throws Exception
ByteBuf
received more data to read. What will be done
with the data at this point is up to the implementation.
Implementations may choose to read it or just let it in the buffer to read it later.Exception
Copyright © 2008-2012 The Netty Project. All Rights Reserved.