onPushPromiseRead() — netty Function Reference
Architecture documentation for the onPushPromiseRead() function in InboundHttp2ToHttpAdapter.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 96c7030b_18d4_a4a9_4d43_ced9a559422c["onPushPromiseRead()"] aed86996_f518_c45d_5bdf_47241b8bdd57["InboundHttp2ToHttpAdapter"] 96c7030b_18d4_a4a9_4d43_ced9a559422c -->|defined in| aed86996_f518_c45d_5bdf_47241b8bdd57 dba66dc8_e4ba_9648_2ce7_0781414afe89["processHeadersEnd()"] 96c7030b_18d4_a4a9_4d43_ced9a559422c -->|calls| dba66dc8_e4ba_9648_2ce7_0781414afe89 style 96c7030b_18d4_a4a9_4d43_ced9a559422c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapter.java lines 290–314
@Override
public void onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId,
Http2Headers headers, int padding) throws Http2Exception {
// A push promise should not be allowed to add headers to an existing stream
Http2Stream promisedStream = connection.stream(promisedStreamId);
if (headers.status() == null) {
// A PUSH_PROMISE frame has no Http response status.
// https://tools.ietf.org/html/rfc7540#section-8.2.1
// Server push is semantically equivalent to a server responding to a
// request; however, in this case, that request is also sent by the
// server, as a PUSH_PROMISE frame.
headers.status(OK.codeAsText());
}
FullHttpMessage msg = processHeadersBegin(ctx, promisedStream, headers, false, false, false);
if (msg == null) {
throw connectionError(PROTOCOL_ERROR, "Push Promise Frame received for pre-existing stream id %d",
promisedStreamId);
}
msg.headers().setInt(HttpConversionUtil.ExtensionHeaderNames.STREAM_PROMISE_ID.text(), streamId);
msg.headers().setShort(HttpConversionUtil.ExtensionHeaderNames.STREAM_WEIGHT.text(),
Http2CodecUtil.DEFAULT_PRIORITY_WEIGHT);
processHeadersEnd(ctx, promisedStream, msg, false);
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does onPushPromiseRead() do?
onPushPromiseRead() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapter.java.
Where is onPushPromiseRead() defined?
onPushPromiseRead() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapter.java at line 290.
What does onPushPromiseRead() call?
onPushPromiseRead() calls 1 function(s): processHeadersEnd.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free