Home / Type/ UpgradeCodec Type — netty Architecture

UpgradeCodec Type — netty Architecture

Architecture documentation for the UpgradeCodec type/interface in HttpClientUpgradeHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  f3d048d5_0c7e_dbed_1569_7fea2db8c87d["UpgradeCodec"]
  ce099943_c46d_ed39_bb85_d07243f07181["HttpClientUpgradeHandler.java"]
  f3d048d5_0c7e_dbed_1569_7fea2db8c87d -->|defined in| ce099943_c46d_ed39_bb85_d07243f07181
  style f3d048d5_0c7e_dbed_1569_7fea2db8c87d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/HttpClientUpgradeHandler.java lines 83–104

    public interface UpgradeCodec {
        /**
         * Returns the name of the protocol supported by this codec, as indicated by the {@code 'UPGRADE'} header.
         */
        CharSequence protocol();

        /**
         * Sets any protocol-specific headers required to the upgrade request. Returns the names of
         * all headers that were added. These headers will be used to populate the CONNECTION header.
         */
        Collection<CharSequence> setUpgradeHeaders(ChannelHandlerContext ctx, HttpRequest upgradeRequest);

        /**
         * Performs an HTTP protocol upgrade from the source codec. This method is responsible for
         * adding all handlers required for the new protocol.
         *
         * @param ctx the context for the current handler.
         * @param upgradeResponse the 101 Switching Protocols response that indicates that the server
         *            has switched to this protocol.
         */
        void upgradeTo(ChannelHandlerContext ctx, FullHttpResponse upgradeResponse) throws Exception;
    }

Frequently Asked Questions

What is the UpgradeCodec type?
UpgradeCodec is a type/interface in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpClientUpgradeHandler.java.
Where is UpgradeCodec defined?
UpgradeCodec is defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpClientUpgradeHandler.java at line 83.

Analyze Your Own Codebase

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

Try Supermodel Free