Home / Function/ writeAnswer() — netty Function Reference

writeAnswer() — netty Function Reference

Architecture documentation for the writeAnswer() function in UniformStreamByteDistributorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  f3a4b43c_babc_6924_8349_fb09a2a08e04["writeAnswer()"]
  c9ed8a9b_20d0_d85d_3ba2_4bce8a2cb72f["UniformStreamByteDistributorTest"]
  f3a4b43c_babc_6924_8349_fb09a2a08e04 -->|defined in| c9ed8a9b_20d0_d85d_3ba2_4bce8a2cb72f
  ba51586b_9db8_a3bc_5389_8ae4d02826b8["resetWriter()"]
  ba51586b_9db8_a3bc_5389_8ae4d02826b8 -->|calls| f3a4b43c_babc_6924_8349_fb09a2a08e04
  style f3a4b43c_babc_6924_8349_fb09a2a08e04 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/UniformStreamByteDistributorTest.java lines 86–99

    private Answer<Void> writeAnswer() {
        return new Answer<Void>() {
            @Override
            public Void answer(InvocationOnMock in) throws Throwable {
                Http2Stream stream = in.getArgument(0);
                int numBytes = in.getArgument(1);
                TestStreamByteDistributorStreamState state = stateMap.get(stream.id());
                state.pendingBytes -= numBytes;
                state.hasFrame = state.pendingBytes > 0;
                distributor.updateStreamableBytes(state);
                return null;
            }
        };
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does writeAnswer() do?
writeAnswer() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/UniformStreamByteDistributorTest.java.
Where is writeAnswer() defined?
writeAnswer() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/UniformStreamByteDistributorTest.java at line 86.
What calls writeAnswer()?
writeAnswer() is called by 1 function(s): resetWriter.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free