Home / Function/ configureClearText() — netty Function Reference

configureClearText() — netty Function Reference

Architecture documentation for the configureClearText() function in Http2ServerInitializer.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  b65bc168_5b75_5a15_71ca_7c2a8919c815["configureClearText()"]
  8d5f7d30_172c_30af_5e36_167b7fbb8b95["Http2ServerInitializer"]
  b65bc168_5b75_5a15_71ca_7c2a8919c815 -->|defined in| 8d5f7d30_172c_30af_5e36_167b7fbb8b95
  5ff560df_d056_7021_bf34_918c98dea01e["initChannel()"]
  5ff560df_d056_7021_bf34_918c98dea01e -->|calls| b65bc168_5b75_5a15_71ca_7c2a8919c815
  style b65bc168_5b75_5a15_71ca_7c2a8919c815 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2ServerInitializer.java lines 92–111

    private void configureClearText(SocketChannel ch) {
        final ChannelPipeline p = ch.pipeline();
        final HttpServerCodec sourceCodec = new HttpServerCodec();

        p.addLast(sourceCodec);
        p.addLast(new HttpServerUpgradeHandler(sourceCodec, upgradeCodecFactory));
        p.addLast(new SimpleChannelInboundHandler<HttpMessage>() {
            @Override
            protected void channelRead0(ChannelHandlerContext ctx, HttpMessage msg) throws Exception {
                // If this handler is hit then no upgrade has been attempted and the client is just talking HTTP.
                System.err.println("Directly talking: " + msg.protocolVersion() + " (no upgrade was attempted)");
                ChannelPipeline pipeline = ctx.pipeline();
                pipeline.addAfter(ctx.name(), null, new HelloWorldHttp1Handler("Direct. No Upgrade Attempted."));
                pipeline.replace(this, null, new HttpObjectAggregator(maxHttpContentLength));
                ctx.fireChannelRead(ReferenceCountUtil.retain(msg));
            }
        });

        p.addLast(new UserEventLogger());
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does configureClearText() do?
configureClearText() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2ServerInitializer.java.
Where is configureClearText() defined?
configureClearText() is defined in example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2ServerInitializer.java at line 92.
What calls configureClearText()?
configureClearText() is called by 1 function(s): initChannel.

Analyze Your Own Codebase

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

Try Supermodel Free