Home / Class/ WebSocketDecoderConfig Class — netty Architecture

WebSocketDecoderConfig Class — netty Architecture

Architecture documentation for the WebSocketDecoderConfig class in WebSocketDecoderConfig.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  06c46c99_2c9e_3a8f_a566_b931ec422903["WebSocketDecoderConfig"]
  3579b8fc_7122_d5ba_f1c1_9e8b0ec42998["WebSocketDecoderConfig.java"]
  06c46c99_2c9e_3a8f_a566_b931ec422903 -->|defined in| 3579b8fc_7122_d5ba_f1c1_9e8b0ec42998
  e466d610_cbbd_7f9a_14ec_e6dff37d9468["WebSocketDecoderConfig()"]
  06c46c99_2c9e_3a8f_a566_b931ec422903 -->|method| e466d610_cbbd_7f9a_14ec_e6dff37d9468
  ece8d67d_8377_6bb0_8ec0_0594792a9050["maxFramePayloadLength()"]
  06c46c99_2c9e_3a8f_a566_b931ec422903 -->|method| ece8d67d_8377_6bb0_8ec0_0594792a9050
  e97b249b_8cf9_e01f_f92f_f1fb79360e00["expectMaskedFrames()"]
  06c46c99_2c9e_3a8f_a566_b931ec422903 -->|method| e97b249b_8cf9_e01f_f92f_f1fb79360e00
  e824c436_61b0_df59_d4fa_a8ba806dad0d["allowMaskMismatch()"]
  06c46c99_2c9e_3a8f_a566_b931ec422903 -->|method| e824c436_61b0_df59_d4fa_a8ba806dad0d
  c4dc1209_5364_41c8_630b_9dbeea32cd41["allowExtensions()"]
  06c46c99_2c9e_3a8f_a566_b931ec422903 -->|method| c4dc1209_5364_41c8_630b_9dbeea32cd41
  c66d11cd_2f01_c285_10db_697b4df3d471["closeOnProtocolViolation()"]
  06c46c99_2c9e_3a8f_a566_b931ec422903 -->|method| c66d11cd_2f01_c285_10db_697b4df3d471
  ea9b26f5_f1e1_9145_b08e_4314eeed9714["withUTF8Validator()"]
  06c46c99_2c9e_3a8f_a566_b931ec422903 -->|method| ea9b26f5_f1e1_9145_b08e_4314eeed9714
  29c72153_0792_5d35_d756_6621e583d991["String()"]
  06c46c99_2c9e_3a8f_a566_b931ec422903 -->|method| 29c72153_0792_5d35_d756_6621e583d991
  c913169b_de52_90ec_4d57_adbef58fca5a["Builder()"]
  06c46c99_2c9e_3a8f_a566_b931ec422903 -->|method| c913169b_de52_90ec_4d57_adbef58fca5a

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketDecoderConfig.java lines 23–165

public final class WebSocketDecoderConfig {

    static final WebSocketDecoderConfig DEFAULT =
        new WebSocketDecoderConfig(65536, true, false, false, true, true);

    private final int maxFramePayloadLength;
    private final boolean expectMaskedFrames;
    private final boolean allowMaskMismatch;
    private final boolean allowExtensions;
    private final boolean closeOnProtocolViolation;
    private final boolean withUTF8Validator;

    /**
     * Constructor
     *
     * @param maxFramePayloadLength
     *            Maximum length of a frame's payload. Setting this to an appropriate value for you application
     *            helps check for denial of services attacks.
     * @param expectMaskedFrames
     *            Web socket servers must set this to true processed incoming masked payload. Client implementations
     *            must set this to false.
     * @param 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.
     * @param allowExtensions
     *            Flag to allow reserved extension bits to be used or not
     * @param closeOnProtocolViolation
     *            Flag to send close frame immediately on any protocol violation.ion.
     * @param 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.
     */
    private WebSocketDecoderConfig(int maxFramePayloadLength, boolean expectMaskedFrames, boolean allowMaskMismatch,
                                  boolean allowExtensions, boolean closeOnProtocolViolation,
                                  boolean withUTF8Validator) {
        this.maxFramePayloadLength = maxFramePayloadLength;
        this.expectMaskedFrames = expectMaskedFrames;
        this.allowMaskMismatch = allowMaskMismatch;
        this.allowExtensions = allowExtensions;
        this.closeOnProtocolViolation = closeOnProtocolViolation;
        this.withUTF8Validator = withUTF8Validator;
    }

    public int maxFramePayloadLength() {
        return maxFramePayloadLength;
    }

    public boolean expectMaskedFrames() {
        return expectMaskedFrames;
    }

    public boolean allowMaskMismatch() {
        return allowMaskMismatch;
    }

    public boolean allowExtensions() {
        return allowExtensions;
    }

    public boolean closeOnProtocolViolation() {
        return closeOnProtocolViolation;
    }

    public boolean withUTF8Validator() {
        return withUTF8Validator;
    }

    @Override
    public String toString() {
        return "WebSocketDecoderConfig" +
            " [maxFramePayloadLength=" + maxFramePayloadLength +
            ", expectMaskedFrames=" + expectMaskedFrames +
            ", allowMaskMismatch=" + allowMaskMismatch +
            ", allowExtensions=" + allowExtensions +
            ", closeOnProtocolViolation=" + closeOnProtocolViolation +
            ", withUTF8Validator=" + withUTF8Validator +
            "]";
    }

    public Builder toBuilder() {

Frequently Asked Questions

What is the WebSocketDecoderConfig class?
WebSocketDecoderConfig is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketDecoderConfig.java.
Where is WebSocketDecoderConfig defined?
WebSocketDecoderConfig is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketDecoderConfig.java at line 23.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free