Home / Function/ onDataRead() — netty Function Reference

onDataRead() — netty Function Reference

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

Function java Buffer Search calls 1 called by 1

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

example/src/main/java/io/netty/example/http2/helloworld/frame/server/HelloWorldHttp2Handler.java lines 72–84

    private static void onDataRead(ChannelHandlerContext ctx, Http2DataFrame data) throws Exception {
        Http2FrameStream stream = data.stream();

        if (data.isEndStream()) {
            sendResponse(ctx, stream, data.content());
        } else {
            // We do not send back the response to the remote-peer, so we need to release it.
            data.release();
        }

        // Update the flowcontroller
        ctx.write(new DefaultHttp2WindowUpdateFrame(data.initialFlowControlledBytes()).stream(stream));
    }

Domain

Subdomains

Called By

Frequently Asked Questions

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