public class CompatibleMarshallingDecoder extends ReplayingDecoder<Void>
ReplayingDecoder which use an Unmarshaller to read the Object out of the ByteBuf.
 If you can you should use MarshallingDecoder.ByteToMessageDecoder.CumulatorChannelHandler.Sharable, ChannelHandler.Skip| Modifier and Type | Field and Description | 
|---|---|
| protected int | maxObjectSize | 
| protected UnmarshallerProvider | provider | 
COMPOSITE_CUMULATOR, MERGE_CUMULATOR| Constructor and Description | 
|---|
| CompatibleMarshallingDecoder(UnmarshallerProvider provider,
                            int maxObjectSize)Create a new instance of  CompatibleMarshallingDecoder. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | decode(ChannelHandlerContext ctx,
      ByteBuf buffer,
      List<Object> out)Decode the from one  ByteBufto an other. | 
| protected void | decodeLast(ChannelHandlerContext ctx,
          ByteBuf buffer,
          List<Object> out)Is called one last time when the  ChannelHandlerContextgoes in-active. | 
| void | exceptionCaught(ChannelHandlerContext ctx,
               Throwable cause)Calls  ChannelHandlerContext.fireExceptionCaught(Throwable)to forward
 to the nextChannelHandlerin theChannelPipeline. | 
callDecode, channelInactive, checkpoint, checkpoint, state, stateactualReadableBytes, channelRead, channelReadComplete, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setSingleDecodebind, channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, flush, handlerAdded, isSharable, read, userEventTriggered, writeprotected final UnmarshallerProvider provider
protected final int maxObjectSize
public CompatibleMarshallingDecoder(UnmarshallerProvider provider, int maxObjectSize)
CompatibleMarshallingDecoder.provider - the UnmarshallerProvider which is used to obtain the Unmarshaller
        for the ChannelmaxObjectSize - the maximal size (in bytes) of the Object to unmarshal. Once the size is
        exceeded the Channel will get closed. Use a a maxObjectSize of
        Integer.MAX_VALUE to disable this.  You should only do this if you are sure
        that the received Objects will never be big and the sending side are trusted, as this
        opens the possibility for a DOS-Attack due an OutOfMemoryError.protected void decode(ChannelHandlerContext ctx, ByteBuf buffer, List<Object> out) throws Exception
ByteToMessageDecoderByteBuf to an other. This method will be called till either the input
 ByteBuf has nothing to read when return from this method or till nothing was read from the input
 ByteBuf.decode in class ByteToMessageDecoderctx - the ChannelHandlerContext which this ByteToMessageDecoder belongs tobuffer - the ByteBuf from which to read dataout - the List to which decoded messages should be addedException - is thrown if an error accourprotected void decodeLast(ChannelHandlerContext ctx, ByteBuf buffer, List<Object> out) throws Exception
ByteToMessageDecoderChannelHandlerContext goes in-active. Which means the
 ByteToMessageDecoder.channelInactive(ChannelHandlerContext) was triggered.
 By default this will just call ByteToMessageDecoder.decode(ChannelHandlerContext, ByteBuf, List) but sub-classes may
 override this for some special cleanup operation.decodeLast in class ByteToMessageDecoderExceptionpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
ChannelHandlerAdapterChannelHandlerContext.fireExceptionCaught(Throwable) to forward
 to the next ChannelHandler in the ChannelPipeline.
 Sub-classes may override this method to change behavior.exceptionCaught in interface ChannelHandlerexceptionCaught in class ChannelHandlerAdapterExceptionCopyright © 2008–2015 The Netty Project. All rights reserved.