Home / Class/ Builder Class — netty Architecture

Builder Class — netty Architecture

Architecture documentation for the Builder class in WebSocketClientProtocolConfig.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  2b6aa6cd_0014_1c6a_b672_a47d2b43c27c["Builder"]
  fcce86b1_2ec8_be5e_aa00_d820807b9769["WebSocketClientProtocolConfig.java"]
  2b6aa6cd_0014_1c6a_b672_a47d2b43c27c -->|defined in| fcce86b1_2ec8_be5e_aa00_d820807b9769
  32ad011e_21c7_7ef2_d6d1_332d9656c5e8["Builder()"]
  2b6aa6cd_0014_1c6a_b672_a47d2b43c27c -->|method| 32ad011e_21c7_7ef2_d6d1_332d9656c5e8
  4082e86b_595d_40d6_0633_2dcf26b272e8["WebSocketClientProtocolConfig()"]
  2b6aa6cd_0014_1c6a_b672_a47d2b43c27c -->|method| 4082e86b_595d_40d6_0633_2dcf26b272e8

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolConfig.java lines 202–438

    public static final class Builder {
        private URI webSocketUri;
        private String subprotocol;
        private WebSocketVersion version;
        private boolean allowExtensions;
        private HttpHeaders customHeaders;
        private int maxFramePayloadLength;
        private boolean performMasking;
        private boolean allowMaskMismatch;
        private boolean handleCloseFrames;
        private WebSocketCloseStatus sendCloseFrame;
        private boolean dropPongFrames;
        private long handshakeTimeoutMillis;
        private long forceCloseTimeoutMillis;
        private boolean absoluteUpgradeUrl;
        private boolean generateOriginHeader;
        private boolean withUTF8Validator;

        private Builder(WebSocketClientProtocolConfig clientConfig) {
            this(ObjectUtil.checkNotNull(clientConfig, "clientConfig").webSocketUri(),
                 clientConfig.subprotocol(),
                 clientConfig.version(),
                 clientConfig.allowExtensions(),
                 clientConfig.customHeaders(),
                 clientConfig.maxFramePayloadLength(),
                 clientConfig.performMasking(),
                 clientConfig.allowMaskMismatch(),
                 clientConfig.handleCloseFrames(),
                 clientConfig.sendCloseFrame(),
                 clientConfig.dropPongFrames(),
                 clientConfig.handshakeTimeoutMillis(),
                 clientConfig.forceCloseTimeoutMillis(),
                 clientConfig.absoluteUpgradeUrl(),
                 clientConfig.generateOriginHeader(),
                 clientConfig.withUTF8Validator());
        }

        private Builder(URI webSocketUri,
                        String subprotocol,
                        WebSocketVersion version,
                        boolean allowExtensions,
                        HttpHeaders customHeaders,
                        int maxFramePayloadLength,
                        boolean performMasking,
                        boolean allowMaskMismatch,
                        boolean handleCloseFrames,
                        WebSocketCloseStatus sendCloseFrame,
                        boolean dropPongFrames,
                        long handshakeTimeoutMillis,
                        long forceCloseTimeoutMillis,
                        boolean absoluteUpgradeUrl,
                        boolean generateOriginHeader,
                        boolean withUTF8Validator) {
            this.webSocketUri = webSocketUri;
            this.subprotocol = subprotocol;
            this.version = version;
            this.allowExtensions = allowExtensions;
            this.customHeaders = customHeaders;
            this.maxFramePayloadLength = maxFramePayloadLength;
            this.performMasking = performMasking;
            this.allowMaskMismatch = allowMaskMismatch;
            this.handleCloseFrames = handleCloseFrames;
            this.sendCloseFrame = sendCloseFrame;
            this.dropPongFrames = dropPongFrames;
            this.handshakeTimeoutMillis = handshakeTimeoutMillis;
            this.forceCloseTimeoutMillis = forceCloseTimeoutMillis;
            this.absoluteUpgradeUrl = absoluteUpgradeUrl;
            this.generateOriginHeader = generateOriginHeader;
            this.withUTF8Validator = withUTF8Validator;
        }

        /**
         * URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be
         * sent to this URL.
         */
        public Builder webSocketUri(String webSocketUri) {
            return webSocketUri(URI.create(webSocketUri));
        }

        /**
         * URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free