public abstract class MessageToMessageCodec<INBOUND_IN,INBOUND_OUT,OUTBOUND_IN,OUTBOUND_OUT>
extends io.netty.channel.ChannelHandlerAdapter
implements io.netty.channel.ChannelInboundMessageHandler<INBOUND_IN>, io.netty.channel.ChannelOutboundMessageHandler<OUTBOUND_IN>
| Modifier | Constructor and Description |
|---|---|
protected |
MessageToMessageCodec() |
protected |
MessageToMessageCodec(Class<?>[] acceptedInboundMsgTypes,
Class<?>[] acceptedOutboundMsgTypes) |
| Modifier and Type | Method and Description |
|---|---|
abstract INBOUND_OUT |
decode(io.netty.channel.ChannelHandlerContext ctx,
INBOUND_IN msg) |
abstract OUTBOUND_OUT |
encode(io.netty.channel.ChannelHandlerContext ctx,
OUTBOUND_IN msg) |
void |
flush(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelFuture future) |
void |
inboundBufferUpdated(io.netty.channel.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. |
io.netty.buffer.MessageBuf<INBOUND_IN> |
newInboundBuffer(io.netty.channel.ChannelHandlerContext ctx) |
io.netty.buffer.MessageBuf<OUTBOUND_IN> |
newOutboundBuffer(io.netty.channel.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, channelUnregisteredpublic io.netty.buffer.MessageBuf<INBOUND_IN> newInboundBuffer(io.netty.channel.ChannelHandlerContext ctx) throws Exception
newInboundBuffer in interface io.netty.channel.ChannelInboundHandlernewInboundBuffer in interface io.netty.channel.ChannelInboundMessageHandler<INBOUND_IN>Exceptionpublic void inboundBufferUpdated(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
inboundBufferUpdated in interface io.netty.channel.ChannelStateHandlerinboundBufferUpdated in class io.netty.channel.ChannelStateHandlerAdapterExceptionpublic io.netty.buffer.MessageBuf<OUTBOUND_IN> newOutboundBuffer(io.netty.channel.ChannelHandlerContext ctx) throws Exception
newOutboundBuffer in interface io.netty.channel.ChannelOutboundHandlernewOutboundBuffer in interface io.netty.channel.ChannelOutboundMessageHandler<OUTBOUND_IN>Exceptionpublic void flush(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelFuture future)
throws Exception
flush in interface io.netty.channel.ChannelOperationHandlerflush in class io.netty.channel.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(io.netty.channel.ChannelHandlerContext ctx, OUTBOUND_IN msg) throws Exception
Exceptionpublic abstract INBOUND_OUT decode(io.netty.channel.ChannelHandlerContext ctx, INBOUND_IN msg) throws Exception
ExceptionCopyright © 2008-2012 The Netty Project. All Rights Reserved.