Home / Class/ ExampleHeaders Class — netty Architecture

ExampleHeaders Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  46b9966e_904f_5a98_b2db_a018f2e47162["ExampleHeaders"]
  aa996c7b_6b18_5dce_9dd7_8a33148811a5["ExampleHeaders.java"]
  46b9966e_904f_5a98_b2db_a018f2e47162 -->|defined in| aa996c7b_6b18_5dce_9dd7_8a33148811a5
  0327c10d_777b_be2c_2e21_e8cf041bf570["ExampleHeaders()"]
  46b9966e_904f_5a98_b2db_a018f2e47162 -->|method| 0327c10d_777b_be2c_2e21_e8cf041bf570

Relationship Graph

Source Code

microbench/src/main/java/io/netty/microbench/headers/ExampleHeaders.java lines 22–148

public final class ExampleHeaders {

    public enum HeaderExample {
        THREE,
        FIVE,
        SIX,
        EIGHT,
        ELEVEN,
        TWENTYTWO,
        THIRTY
    }

    public static final Map<HeaderExample, Map<String, String>> EXAMPLES =
            new EnumMap<HeaderExample, Map<String, String>>(HeaderExample.class);

    static {
        Map<String, String> header = new HashMap<String, String>();
        header.put(":method", "GET");
        header.put(":scheme", "https");
        header.put(":path", "/index.html");
        EXAMPLES.put(HeaderExample.THREE, header);

        // Headers used by Norman's HTTP benchmarks with wrk
        header = new HashMap<String, String>();
        header.put("Method", "GET");
        header.put("Path", "/plaintext");
        header.put("Host", "localhost");
        header.put("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
        header.put("Connection", "keep-alive");
        EXAMPLES.put(HeaderExample.FIVE, header);

        header = new HashMap<String, String>();
        header.put(":authority", "127.0.0.1:33333");
        header.put(":method", "POST");
        header.put(":path", "/grpc.testing.TestService/UnaryCall");
        header.put(":scheme", "http");
        header.put("content-type", "application/grpc");
        header.put("te", "trailers");
        EXAMPLES.put(HeaderExample.SIX, header);

        header = new HashMap<String, String>();
        header.put(":method", "POST");
        header.put(":scheme", "http");
        header.put(":path", "/google.pubsub.v2.PublisherService/CreateTopic");
        header.put(":authority", "pubsub.googleapis.com");
        header.put("grpc-timeout", "1S");
        header.put("content-type", "application/grpc+proto");
        header.put("grpc-encoding", "gzip");
        header.put("authorization", "Bearer y235.wef315yfh138vh31hv93hv8h3v");
        EXAMPLES.put(HeaderExample.EIGHT, header);

        header = new HashMap<String, String>();
        header.put(":host", "twitter.com");
        header.put(":method", "GET");
        header.put(":path", "/");
        header.put(":scheme", "https");
        header.put(":version", "HTTP/1.1");
        header.put("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
        header.put("accept-encoding", "gzip, deflate, sdch");
        header.put("accept-language", "en-US,en;q=0.8");
        header.put("cache-control", "max-age=0");
        header.put("cookie", "noneofyourbusiness");
        header.put("user-agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)");
        EXAMPLES.put(HeaderExample.ELEVEN, header);

        header = new HashMap<String, String>();
        header.put("cache-control", "no-cache, no-store, must-revalidate, pre-check=0, post-check=0");
        header.put("content-encoding", "gzip");
        header.put("content-security-policy", "default-src https:; connect-src https:;");
        header.put("content-type", "text/html;charset=utf-8");
        header.put("date", "Wed, 22 Apr 2015 00:40:28 GMT");
        header.put("expires", "Tue, 31 Mar 1981 05:00:00 GMT");
        header.put("last-modified", "Wed, 22 Apr 2015 00:40:28 GMT");
        header.put("ms", "ms");
        header.put("pragma", "no-cache");
        header.put("server", "tsa_b");
        header.put("set-cookie", "noneofyourbusiness");
        header.put("status", "200 OK");
        header.put("strict-transport-security", "max-age=631138519");
        header.put("version", "HTTP/1.1");
        header.put("x-connection-hash", "e176fe40accc1e2c613a34bc1941aa98");

Frequently Asked Questions

What is the ExampleHeaders class?
ExampleHeaders is a class in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/headers/ExampleHeaders.java.
Where is ExampleHeaders defined?
ExampleHeaders is defined in microbench/src/main/java/io/netty/microbench/headers/ExampleHeaders.java at line 22.

Analyze Your Own Codebase

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

Try Supermodel Free