Home / Class/ Http2StaticFileServerInitializer Class — netty Architecture

Http2StaticFileServerInitializer Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  5e833a33_adb3_d1c8_d6e8_e0feb319f0c0["Http2StaticFileServerInitializer"]
  ce42bd71_1f3a_455a_664d_8e0a5eefcb63["Http2StaticFileServerInitializer.java"]
  5e833a33_adb3_d1c8_d6e8_e0feb319f0c0 -->|defined in| ce42bd71_1f3a_455a_664d_8e0a5eefcb63
  9d04531b_f8f9_28e6_00f9_ff4c6c369951["Http2StaticFileServerInitializer()"]
  5e833a33_adb3_d1c8_d6e8_e0feb319f0c0 -->|method| 9d04531b_f8f9_28e6_00f9_ff4c6c369951
  c06b3cc1_48a4_d993_781b_57df27096962["initChannel()"]
  5e833a33_adb3_d1c8_d6e8_e0feb319f0c0 -->|method| c06b3cc1_48a4_d993_781b_57df27096962

Relationship Graph

Source Code

example/src/main/java/io/netty/example/http2/file/Http2StaticFileServerInitializer.java lines 25–41

public class Http2StaticFileServerInitializer extends ChannelInitializer<SocketChannel> {

    private final SslContext sslCtx;

    public Http2StaticFileServerInitializer(SslContext sslCtx) {
        this.sslCtx = sslCtx;
    }

    @Override
    public void initChannel(SocketChannel ch) {
        ChannelPipeline pipeline = ch.pipeline();
        pipeline.addLast(sslCtx.newHandler(ch.alloc()));
        pipeline.addLast(Http2FrameCodecBuilder.forServer().build());
        pipeline.addLast(new ChunkedWriteHandler());
        pipeline.addLast(new Http2StaticFileServerHandler());
    }
}

Frequently Asked Questions

What is the Http2StaticFileServerInitializer class?
Http2StaticFileServerInitializer is a class in the netty codebase, defined in example/src/main/java/io/netty/example/http2/file/Http2StaticFileServerInitializer.java.
Where is Http2StaticFileServerInitializer defined?
Http2StaticFileServerInitializer is defined in example/src/main/java/io/netty/example/http2/file/Http2StaticFileServerInitializer.java at line 25.

Analyze Your Own Codebase

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

Try Supermodel Free