Interface ContentCodecBuilder


  • public interface ContentCodecBuilder
    Builder for ContentCodec.
    • Method Detail

      • setMaxAllowedPayloadSize

        ContentCodecBuilder setMaxAllowedPayloadSize​(int maxAllowedPayloadSize)
        Sets the maximum allowed decompressed payload size that the codec can process. This can help prevent malicious attempts to decode malformed payloads that can drain resources of the running instance.
        Parameters:
        maxAllowedPayloadSize - the maximum allowed payload size
        Returns:
        this
        See Also:
        Zip Bomb
      • build

        ContentCodec build()
        Build and return an instance of the ContentCodec with the configuration of the builder.
        Returns:
        the ContentCodec with the configuration of the builder