Home / Function/ onHeadersRead() — netty Function Reference

onHeadersRead() — netty Function Reference

Architecture documentation for the onHeadersRead() function in HelloWorldHttp2Handler.java from the netty codebase.

Function java Buffer Telemetry calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  6ee65ecb_5c8c_6923_e782_092b8dba7364["onHeadersRead()"]
  fa23b10d_ecd8_5787_14b8_20305e471f36["HelloWorldHttp2Handler"]
  6ee65ecb_5c8c_6923_e782_092b8dba7364 -->|defined in| fa23b10d_ecd8_5787_14b8_20305e471f36
  7c2c193e_a794_8fd3_2bb9_0ab2a904aa24["channelRead()"]
  7c2c193e_a794_8fd3_2bb9_0ab2a904aa24 -->|calls| 6ee65ecb_5c8c_6923_e782_092b8dba7364
  b13faf07_e0fe_ada8_4ade_42b8225c23ef["sendResponse()"]
  6ee65ecb_5c8c_6923_e782_092b8dba7364 -->|calls| b13faf07_e0fe_ada8_4ade_42b8225c23ef
  style 6ee65ecb_5c8c_6923_e782_092b8dba7364 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/http2/helloworld/frame/server/HelloWorldHttp2Handler.java lines 89–97

    private static void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headers)
            throws Exception {
        if (headers.isEndStream()) {
            ByteBuf content = ctx.alloc().buffer();
            content.writeBytes(RESPONSE_BYTES.duplicate());
            ByteBufUtil.writeAscii(content, " - via HTTP/2");
            sendResponse(ctx, headers.stream(), content);
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does onHeadersRead() do?
onHeadersRead() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/http2/helloworld/frame/server/HelloWorldHttp2Handler.java.
Where is onHeadersRead() defined?
onHeadersRead() is defined in example/src/main/java/io/netty/example/http2/helloworld/frame/server/HelloWorldHttp2Handler.java at line 89.
What does onHeadersRead() call?
onHeadersRead() calls 1 function(s): sendResponse.
What calls onHeadersRead()?
onHeadersRead() 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