Class CompatibleMarshallingDecoder

    • Field Detail

      • maxObjectSize

        protected final int maxObjectSize
    • Constructor Detail

      • 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.