Home / Function/ configurePipeline() — netty Function Reference

configurePipeline() — netty Function Reference

Architecture documentation for the configurePipeline() function in Http2OrHttpHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  c00bf55e_2c26_99e5_1795_0c6358b2ca67["configurePipeline()"]
  d89cf5e8_dd84_6aa4_a07e_baeb8aefa500["Http2OrHttpHandler"]
  c00bf55e_2c26_99e5_1795_0c6358b2ca67 -->|defined in| d89cf5e8_dd84_6aa4_a07e_baeb8aefa500
  style c00bf55e_2c26_99e5_1795_0c6358b2ca67 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/http2/helloworld/server/Http2OrHttpHandler.java lines 35–50

    @Override
    protected void configurePipeline(ChannelHandlerContext ctx, String protocol) throws Exception {
        if (ApplicationProtocolNames.HTTP_2.equals(protocol)) {
            ctx.pipeline().addLast(new HelloWorldHttp2HandlerBuilder().build());
            return;
        }

        if (ApplicationProtocolNames.HTTP_1_1.equals(protocol)) {
            ctx.pipeline().addLast(new HttpServerCodec(),
                                   new HttpObjectAggregator(MAX_CONTENT_LENGTH),
                                   new HelloWorldHttp1Handler("ALPN Negotiation"));
            return;
        }

        throw new IllegalStateException("unknown protocol: " + protocol);
    }

Domain

Subdomains

Frequently Asked Questions

What does configurePipeline() do?
configurePipeline() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/http2/helloworld/server/Http2OrHttpHandler.java.
Where is configurePipeline() defined?
configurePipeline() is defined in example/src/main/java/io/netty/example/http2/helloworld/server/Http2OrHttpHandler.java at line 35.

Analyze Your Own Codebase

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

Try Supermodel Free