public abstract class ByteToMessageDecoder<O> extends ChannelInboundHandlerAdapter implements ChannelInboundByteHandler
ChannelHandler.Sharable| Constructor and Description |
|---|
ByteToMessageDecoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeAdd(ChannelHandlerContext ctx) |
protected void |
callDecode(ChannelHandlerContext ctx) |
void |
channelInactive(ChannelHandlerContext ctx) |
abstract O |
decode(ChannelHandlerContext ctx,
ByteBuf in) |
O |
decodeLast(ChannelHandlerContext ctx,
ByteBuf in) |
void |
inboundBufferUpdated(ChannelHandlerContext ctx) |
ByteBuf |
newInboundBuffer(ChannelHandlerContext ctx) |
void |
replace(String newHandlerName,
ChannelInboundByteHandler newHandler)
Replace this decoder in the
ChannelPipeline with the given handler. |
afterAdd, afterRemove, beforeRemove, channelActive, channelRegistered, channelUnregistered, exceptionCaught, userEventTriggeredclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchannelActive, channelRegistered, channelUnregisteredafterAdd, afterRemove, beforeRemove, exceptionCaught, userEventTriggeredpublic void beforeAdd(ChannelHandlerContext ctx) throws Exception
beforeAdd in interface ChannelHandlerbeforeAdd in class ChannelStateHandlerAdapterExceptionpublic ByteBuf newInboundBuffer(ChannelHandlerContext ctx) throws Exception
newInboundBuffer in interface ChannelInboundByteHandlernewInboundBuffer in interface ChannelInboundHandlerExceptionpublic void inboundBufferUpdated(ChannelHandlerContext ctx) throws Exception
inboundBufferUpdated in interface ChannelStateHandlerinboundBufferUpdated in class ChannelInboundHandlerAdapterExceptionpublic void channelInactive(ChannelHandlerContext ctx) throws Exception
channelInactive in interface ChannelStateHandlerchannelInactive in class ChannelStateHandlerAdapterExceptionprotected void callDecode(ChannelHandlerContext ctx)
public void replace(String newHandlerName, ChannelInboundByteHandler newHandler)
ChannelPipeline with the given handler.
All remaining bytes in the inbound buffer will be forwarded to the new handler's
inbound buffer.public abstract O decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception
Exceptionpublic O decodeLast(ChannelHandlerContext ctx, ByteBuf in) throws Exception
ExceptionCopyright © 2008-2012 The Netty Project. All Rights Reserved.