Http2ClientFrameInitializer Class — netty Architecture
Architecture documentation for the Http2ClientFrameInitializer class in Http2ClientFrameInitializer.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 6149efff_ed30_8b1e_9fcc_86681694a1e5["Http2ClientFrameInitializer"] 60d0cbcc_c16d_f9bb_4b75_7bf603403028["Http2ClientFrameInitializer.java"] 6149efff_ed30_8b1e_9fcc_86681694a1e5 -->|defined in| 60d0cbcc_c16d_f9bb_4b75_7bf603403028 7bb5edc8_6389_cab6_4ecf_f10297a9d4b1["Http2ClientFrameInitializer()"] 6149efff_ed30_8b1e_9fcc_86681694a1e5 -->|method| 7bb5edc8_6389_cab6_4ecf_f10297a9d4b1 76fab784_7e86_b71f_c0be_567bb71cf135["initChannel()"] 6149efff_ed30_8b1e_9fcc_86681694a1e5 -->|method| 76fab784_7e86_b71f_c0be_567bb71cf135
Relationship Graph
Source Code
example/src/main/java/io/netty/example/http2/helloworld/frame/client/Http2ClientFrameInitializer.java lines 30–57
public final class Http2ClientFrameInitializer extends ChannelInitializer<Channel> {
private final SslContext sslCtx;
public Http2ClientFrameInitializer(SslContext sslCtx) {
this.sslCtx = sslCtx;
}
@Override
protected void initChannel(Channel ch) throws Exception {
// ensure that our 'trust all' SSL handler is the first in the pipeline if SSL is enabled.
if (sslCtx != null) {
ch.pipeline().addFirst(sslCtx.newHandler(ch.alloc()));
}
final Http2FrameCodec http2FrameCodec = Http2FrameCodecBuilder.forClient()
.initialSettings(Http2Settings.defaultSettings()) // this is the default, but shows it can be changed.
.build();
ch.pipeline().addLast(http2FrameCodec);
ch.pipeline().addLast(new Http2MultiplexHandler(new SimpleChannelInboundHandler() {
@Override
protected void channelRead0(ChannelHandlerContext ctx, Object msg) {
// NOOP (this is the handler for 'inbound' streams, which is not relevant in this example)
}
}));
}
}
Source
Frequently Asked Questions
What is the Http2ClientFrameInitializer class?
Http2ClientFrameInitializer is a class in the netty codebase, defined in example/src/main/java/io/netty/example/http2/helloworld/frame/client/Http2ClientFrameInitializer.java.
Where is Http2ClientFrameInitializer defined?
Http2ClientFrameInitializer is defined in example/src/main/java/io/netty/example/http2/helloworld/frame/client/Http2ClientFrameInitializer.java at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free