Http3HelloWorldServerHandler.java — netty Source File
Architecture documentation for Http3HelloWorldServerHandler.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2025 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.testsuite_jpms.main;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http3.DefaultHttp3DataFrame;
import io.netty.handler.codec.http3.DefaultHttp3HeadersFrame;
import io.netty.handler.codec.http3.Http3DataFrame;
import io.netty.handler.codec.http3.Http3HeadersFrame;
import io.netty.handler.codec.http3.Http3RequestStreamInboundHandler;
import io.netty.handler.codec.quic.QuicStreamChannel;
import io.netty.util.ReferenceCountUtil;
import java.nio.charset.StandardCharsets;
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);
}
}
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does Http3HelloWorldServerHandler.java do?
Http3HelloWorldServerHandler.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Search subdomain.
Where is Http3HelloWorldServerHandler.java in the architecture?
Http3HelloWorldServerHandler.java is located at testsuite-jpms/src/main/java/io/netty/testsuite_jpms/main/Http3HelloWorldServerHandler.java (domain: Buffer, subdomain: Search, directory: testsuite-jpms/src/main/java/io/netty/testsuite_jpms/main).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free