public abstract class MessageToMessageCodec<INBOUND_IN,INBOUND_OUT,OUTBOUND_IN,OUTBOUND_OUT> extends ChannelHandlerAdapter implements ChannelInboundMessageHandler<INBOUND_IN>, ChannelOutboundMessageHandler<OUTBOUND_IN>
ChannelHandler.Sharable| Constructor and Description |
|---|
MessageToMessageCodec() |
| Modifier and Type | Method and Description |
|---|---|
abstract INBOUND_OUT |
decode(ChannelHandlerContext ctx,
INBOUND_IN msg) |
abstract OUTBOUND_OUT |
encode(ChannelHandlerContext ctx,
OUTBOUND_IN msg) |
void |
flush(ChannelHandlerContext ctx,
ChannelFuture future) |
void |
inboundBufferUpdated(ChannelHandlerContext ctx) |
boolean |
isDecodable(Object msg)
Returns
true if and only if the specified message can be decoded by this codec. |
boolean |
isEncodable(Object msg)
Returns
true if and only if the specified message can be encoded by this codec. |
MessageBuf<INBOUND_IN> |
newInboundBuffer(ChannelHandlerContext ctx) |
MessageBuf<OUTBOUND_IN> |
newOutboundBuffer(ChannelHandlerContext ctx) |
bind, close, connect, deregister, disconnectafterAdd, afterRemove, beforeAdd, beforeRemove, channelActive, channelInactive, channelRegistered, channelUnregistered, exceptionCaught, userEventTriggeredclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchannelActive, channelInactive, channelRegistered, channelUnregisteredbind, close, connect, deregister, disconnectafterAdd, afterRemove, beforeAdd, beforeRemove, exceptionCaught, userEventTriggeredpublic MessageBuf<INBOUND_IN> newInboundBuffer(ChannelHandlerContext ctx) throws Exception
newInboundBuffer in interface ChannelInboundHandlernewInboundBuffer in interface ChannelInboundMessageHandler<INBOUND_IN>Exceptionpublic void inboundBufferUpdated(ChannelHandlerContext ctx) throws Exception
inboundBufferUpdated in interface ChannelStateHandlerinboundBufferUpdated in class ChannelStateHandlerAdapterExceptionpublic MessageBuf<OUTBOUND_IN> newOutboundBuffer(ChannelHandlerContext ctx) throws Exception
newOutboundBuffer in interface ChannelOutboundHandlernewOutboundBuffer in interface ChannelOutboundMessageHandler<OUTBOUND_IN>Exceptionpublic void flush(ChannelHandlerContext ctx, ChannelFuture future) throws Exception
flush in interface ChannelOperationHandlerflush in class ChannelHandlerAdapterExceptionpublic boolean isDecodable(Object msg) throws Exception
true if and only if the specified message can be decoded by this codec.msg - the messageExceptionpublic boolean isEncodable(Object msg) throws Exception
true if and only if the specified message can be encoded by this codec.msg - the messageExceptionpublic abstract OUTBOUND_OUT encode(ChannelHandlerContext ctx, OUTBOUND_IN msg) throws Exception
Exceptionpublic abstract INBOUND_OUT decode(ChannelHandlerContext ctx, INBOUND_IN msg) throws Exception
ExceptionCopyright © 2008-2012 The Netty Project. All Rights Reserved.