public abstract class ByteToMessageDecoder<O>
extends io.netty.channel.ChannelInboundHandlerAdapter
implements io.netty.channel.ChannelInboundByteHandler
| Constructor and Description |
|---|
ByteToMessageDecoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeAdd(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
callDecode(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
abstract O |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in) |
O |
decodeLast(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in) |
void |
inboundBufferUpdated(io.netty.channel.ChannelHandlerContext ctx) |
io.netty.buffer.ByteBuf |
newInboundBuffer(io.netty.channel.ChannelHandlerContext ctx) |
void |
replace(String newHandlerName,
io.netty.channel.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, waitpublic void beforeAdd(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
beforeAdd in interface io.netty.channel.ChannelHandlerbeforeAdd in class io.netty.channel.ChannelStateHandlerAdapterExceptionpublic io.netty.buffer.ByteBuf newInboundBuffer(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
newInboundBuffer in interface io.netty.channel.ChannelInboundByteHandlernewInboundBuffer in interface io.netty.channel.ChannelInboundHandlerExceptionpublic void inboundBufferUpdated(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
inboundBufferUpdated in interface io.netty.channel.ChannelStateHandlerinboundBufferUpdated in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelStateHandlerchannelInactive in class io.netty.channel.ChannelStateHandlerAdapterExceptionprotected void callDecode(io.netty.channel.ChannelHandlerContext ctx)
public void replace(String newHandlerName, io.netty.channel.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(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in) throws Exception
ExceptionCopyright © 2008-2012 The Netty Project. All Rights Reserved.