Home / Class/ Http3HelloWorldServerHandler Class — netty Architecture

Http3HelloWorldServerHandler Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  50fc3668_3da2_e51f_2cd4_3329f0a5bca7["Http3HelloWorldServerHandler"]
  d985059b_b4c4_76b6_6f89_d7a04a0085ab["Http3HelloWorldServerHandler.java"]
  50fc3668_3da2_e51f_2cd4_3329f0a5bca7 -->|defined in| d985059b_b4c4_76b6_6f89_d7a04a0085ab
  f0074e35_93cf_e499_be01_0150ec2ade39["channelRead()"]
  50fc3668_3da2_e51f_2cd4_3329f0a5bca7 -->|method| f0074e35_93cf_e499_be01_0150ec2ade39
  8bc498d2_ae25_f9fd_d4ca_3f6d249714e0["channelInputClosed()"]
  50fc3668_3da2_e51f_2cd4_3329f0a5bca7 -->|method| 8bc498d2_ae25_f9fd_d4ca_3f6d249714e0

Relationship Graph

Source Code

testsuite-jpms/src/main/java/io/netty/testsuite_jpms/main/Http3HelloWorldServerHandler.java lines 31–57

public class Http3HelloWorldServerHandler extends Http3RequestStreamInboundHandler {

    @Override
    protected void channelRead(ChannelHandlerContext ctx, Http3HeadersFrame frame) {
        ReferenceCountUtil.release(frame);
    }

    @Override
    protected void channelRead(ChannelHandlerContext ctx, Http3DataFrame frame) {
        ReferenceCountUtil.release(frame);
    }

    @Override
    protected void channelInputClosed(ChannelHandlerContext ctx) {

        String hello = HttpHelloWorldServer.content(ctx);
        ByteBuf data = Unpooled.copiedBuffer(hello, StandardCharsets.UTF_8);

        Http3HeadersFrame headersFrame = new DefaultHttp3HeadersFrame();
        headersFrame.headers().status("200");
        headersFrame.headers().add("server", "netty");
        headersFrame.headers().addInt("content-length", data.readableBytes());
        ctx.write(headersFrame);
        ctx.writeAndFlush(new DefaultHttp3DataFrame(data))
                .addListener(QuicStreamChannel.SHUTDOWN_OUTPUT);
    }
}

Frequently Asked Questions

What is the Http3HelloWorldServerHandler class?
Http3HelloWorldServerHandler is a class in the netty codebase, defined in testsuite-jpms/src/main/java/io/netty/testsuite_jpms/main/Http3HelloWorldServerHandler.java.
Where is Http3HelloWorldServerHandler defined?
Http3HelloWorldServerHandler is defined in testsuite-jpms/src/main/java/io/netty/testsuite_jpms/main/Http3HelloWorldServerHandler.java at line 31.

Analyze Your Own Codebase

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

Try Supermodel Free