Class CompatibleMarshallingDecoder

All Implemented Interfaces:
ChannelHandler, ChannelUpstreamHandler, LifeCycleAwareChannelHandler

public class CompatibleMarshallingDecoder extends ReplayingDecoder<VoidEnum>
ReplayingDecoder which use an Unmarshaller to read the Object out of the ChannelBuffer. If you can you should use MarshallingDecoder.
  • Field Details

    • provider

      protected final UnmarshallerProvider provider
    • maxObjectSize

      protected final int maxObjectSize
    • discardingTooLongFrame

      private boolean discardingTooLongFrame
  • Constructor Details

    • CompatibleMarshallingDecoder

      public CompatibleMarshallingDecoder(UnmarshallerProvider provider, int maxObjectSize)
      Create a new instance of CompatibleMarshallingDecoder.
      Parameters:
      provider - the UnmarshallerProvider which is used to obtain the Unmarshaller for the Channel
      maxObjectSize - 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.
  • Method Details