Home / Class/ HttpScheme Class — netty Architecture

HttpScheme Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  ad8cbe40_9207_c448_c2ad_a0eb020a9643["HttpScheme"]
  e063381f_aaec_f16a_08c4_32cf5fd4a86a["HttpScheme.java"]
  ad8cbe40_9207_c448_c2ad_a0eb020a9643 -->|defined in| e063381f_aaec_f16a_08c4_32cf5fd4a86a
  dc7091b0_409a_986c_032d_052027112117["HttpScheme()"]
  ad8cbe40_9207_c448_c2ad_a0eb020a9643 -->|method| dc7091b0_409a_986c_032d_052027112117
  69c83344_6472_162a_9464_20914b7ad3aa["AsciiString()"]
  ad8cbe40_9207_c448_c2ad_a0eb020a9643 -->|method| 69c83344_6472_162a_9464_20914b7ad3aa
  5d539277_5b47_76a4_df6a_dd41fe54bf57["port()"]
  ad8cbe40_9207_c448_c2ad_a0eb020a9643 -->|method| 5d539277_5b47_76a4_df6a_dd41fe54bf57
  85c2ea8e_7c01_188e_a28f_b13184eb65b6["equals()"]
  ad8cbe40_9207_c448_c2ad_a0eb020a9643 -->|method| 85c2ea8e_7c01_188e_a28f_b13184eb65b6
  cc629f8c_3e66_86c9_ced0_06d54238202d["hashCode()"]
  ad8cbe40_9207_c448_c2ad_a0eb020a9643 -->|method| cc629f8c_3e66_86c9_ced0_06d54238202d
  382ff5cb_cb80_b550_2986_bf20af48eb05["String()"]
  ad8cbe40_9207_c448_c2ad_a0eb020a9643 -->|method| 382ff5cb_cb80_b550_2986_bf20af48eb05

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/HttpScheme.java lines 24–70

public final class HttpScheme {

    /**
     * Scheme for non-secure HTTP connection.
     */
    public static final HttpScheme HTTP = new HttpScheme(80, "http");

    /**
     * Scheme for secure HTTP connection.
     */
    public static final HttpScheme HTTPS = new HttpScheme(443, "https");

    private final int port;
    private final AsciiString name;

    private HttpScheme(int port, String name) {
        this.port = port;
        this.name = AsciiString.cached(name);
    }

    public AsciiString name() {
        return name;
    }

    public int port() {
        return port;
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof HttpScheme)) {
            return false;
        }
        HttpScheme other = (HttpScheme) o;
        return other.port() == port && other.name().equals(name);
    }

    @Override
    public int hashCode() {
        return port * 31 + name.hashCode();
    }

    @Override
    public String toString() {
        return name.toString();
    }
}

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free