public abstract class ByteToMessageCodec<I>
extends io.netty.channel.ChannelDuplexHandler
implements io.netty.channel.ChannelInboundByteHandler, io.netty.channel.ChannelOutboundMessageHandler<I>
| Modifier | Constructor and Description |
|---|---|
protected |
ByteToMessageCodec() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptOutboundMessage(Object msg) |
void |
beforeAdd(io.netty.channel.ChannelHandlerContext ctx) |
protected abstract Object |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in) |
protected Object |
decodeLast(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in) |
void |
discardInboundReadBytes(io.netty.channel.ChannelHandlerContext ctx) |
protected abstract void |
encode(io.netty.channel.ChannelHandlerContext ctx,
I msg,
io.netty.buffer.ByteBuf out) |
void |
flush(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
freeInboundBuffer(io.netty.channel.ChannelHandlerContext ctx) |
void |
freeOutboundBuffer(io.netty.channel.ChannelHandlerContext ctx) |
void |
inboundBufferUpdated(io.netty.channel.ChannelHandlerContext ctx) |
io.netty.buffer.ByteBuf |
newInboundBuffer(io.netty.channel.ChannelHandlerContext ctx) |
io.netty.buffer.MessageBuf<I> |
newOutboundBuffer(io.netty.channel.ChannelHandlerContext ctx) |
bind, close, connect, deregister, disconnect, read, sendFilechannelActive, channelInactive, channelReadSuspended, channelRegistered, channelUnregistered, userEventTriggeredafterAdd, afterRemove, beforeRemove, exceptionCaughtclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchannelActive, channelInactive, channelReadSuspended, channelRegistered, channelUnregistered, userEventTriggeredpublic void beforeAdd(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
beforeAdd in interface io.netty.channel.ChannelHandlerbeforeAdd in class io.netty.channel.ChannelHandlerAdapterExceptionpublic io.netty.buffer.ByteBuf newInboundBuffer(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
newInboundBuffer in interface io.netty.channel.ChannelInboundByteHandlerExceptionpublic void discardInboundReadBytes(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
discardInboundReadBytes in interface io.netty.channel.ChannelInboundByteHandlerExceptionpublic void freeInboundBuffer(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
Exceptionpublic io.netty.buffer.MessageBuf<I> newOutboundBuffer(io.netty.channel.ChannelHandlerContext ctx) throws Exception
public void freeOutboundBuffer(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
Exceptionpublic void inboundBufferUpdated(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
inboundBufferUpdated in interface io.netty.channel.ChannelStateHandlerExceptionpublic void flush(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
throws Exception
flush in interface io.netty.channel.ChannelOperationHandlerExceptionpublic boolean acceptOutboundMessage(Object msg) throws Exception
Exceptionprotected abstract void encode(io.netty.channel.ChannelHandlerContext ctx,
I msg,
io.netty.buffer.ByteBuf out)
throws Exception
Exceptionprotected abstract Object decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in) throws Exception
ExceptionCopyright © 2008-2013 The Netty Project. All Rights Reserved.