Class WebSocketDecoderConfig


  • public final class WebSocketDecoderConfig
    extends java.lang.Object
    Frames decoder configuration.
    • Field Detail

      • maxFramePayloadLength

        private final int maxFramePayloadLength
      • expectMaskedFrames

        private final boolean expectMaskedFrames
      • allowMaskMismatch

        private final boolean allowMaskMismatch
      • allowExtensions

        private final boolean allowExtensions
      • closeOnProtocolViolation

        private final boolean closeOnProtocolViolation
      • withUTF8Validator

        private final boolean withUTF8Validator
    • Constructor Detail

      • WebSocketDecoderConfig

        private WebSocketDecoderConfig​(int maxFramePayloadLength,
                                       boolean expectMaskedFrames,
                                       boolean allowMaskMismatch,
                                       boolean allowExtensions,
                                       boolean closeOnProtocolViolation,
                                       boolean withUTF8Validator)
        Constructor
        Parameters:
        maxFramePayloadLength - Maximum length of a frame's payload. Setting this to an appropriate value for you application helps check for denial of services attacks.
        expectMaskedFrames - Web socket servers must set this to true processed incoming masked payload. Client implementations must set this to false.
        allowMaskMismatch - Allows to loosen the masking requirement on received frames. When this is set to false then also frames which are not masked properly according to the standard will still be accepted.
        allowExtensions - Flag to allow reserved extension bits to be used or not
        closeOnProtocolViolation - Flag to send close frame immediately on any protocol violation.ion.
        withUTF8Validator - Allows you to avoid adding of Utf8FrameValidator to the pipeline on the WebSocketServerProtocolHandler creation. This is useful (less overhead) when you use only BinaryWebSocketFrame within your web socket connection.
    • Method Detail

      • maxFramePayloadLength

        public int maxFramePayloadLength()
      • expectMaskedFrames

        public boolean expectMaskedFrames()
      • allowMaskMismatch

        public boolean allowMaskMismatch()
      • allowExtensions

        public boolean allowExtensions()
      • closeOnProtocolViolation

        public boolean closeOnProtocolViolation()
      • withUTF8Validator

        public boolean withUTF8Validator()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object