handle() — netty Function Reference
Architecture documentation for the handle() function in InboundHttpToHttp2Adapter.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3f8e31aa_60e4_8d88_3891_2547a3b5f313["handle()"] b0a0f922_5d85_6902_3570_10d070eb200a["InboundHttpToHttp2Adapter"] 3f8e31aa_60e4_8d88_3891_2547a3b5f313 -->|defined in| b0a0f922_5d85_6902_3570_10d070eb200a 113c2760_d8ce_372d_7ab9_99f2b71d4333["channelRead()"] 113c2760_d8ce_372d_7ab9_99f2b71d4333 -->|calls| 3f8e31aa_60e4_8d88_3891_2547a3b5f313 4f219723_6c91_535c_23e8_6c1aa312114a["getStreamId()"] 3f8e31aa_60e4_8d88_3891_2547a3b5f313 -->|calls| 4f219723_6c91_535c_23e8_6c1aa312114a style 3f8e31aa_60e4_8d88_3891_2547a3b5f313 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttpToHttp2Adapter.java lines 53–78
static void handle(ChannelHandlerContext ctx, Http2Connection connection,
Http2FrameListener listener, FullHttpMessage message) throws Http2Exception {
try {
int streamId = getStreamId(connection, message.headers());
Http2Stream stream = connection.stream(streamId);
if (stream == null) {
stream = connection.remote().createStream(streamId, false);
}
message.headers().set(HttpConversionUtil.ExtensionHeaderNames.SCHEME.text(), HttpScheme.HTTP.name());
Http2Headers messageHeaders = HttpConversionUtil.toHttp2Headers(message, true);
boolean hasContent = message.content().isReadable();
boolean hasTrailers = !message.trailingHeaders().isEmpty();
listener.onHeadersRead(
ctx, streamId, messageHeaders, 0, !(hasContent || hasTrailers));
if (hasContent) {
listener.onDataRead(ctx, streamId, message.content(), 0, !hasTrailers);
}
if (hasTrailers) {
Http2Headers headers = HttpConversionUtil.toHttp2Headers(message.trailingHeaders(), true);
listener.onHeadersRead(ctx, streamId, headers, 0, true);
}
stream.closeRemoteSide();
} finally {
message.release();
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does handle() do?
handle() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttpToHttp2Adapter.java.
Where is handle() defined?
handle() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttpToHttp2Adapter.java at line 53.
What does handle() call?
handle() calls 1 function(s): getStreamId.
What calls handle()?
handle() is called by 1 function(s): channelRead.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free