writeAnswer() — netty Function Reference
Architecture documentation for the writeAnswer() function in AbstractWeightedFairQueueByteDistributorDependencyTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD fb803bf1_8eb0_ccf2_8a51_cb3491520f0b["writeAnswer()"] b9b7733b_0f6e_c50e_36ac_5bfc3582bcf2["AbstractWeightedFairQueueByteDistributorDependencyTest"] fb803bf1_8eb0_ccf2_8a51_cb3491520f0b -->|defined in| b9b7733b_0f6e_c50e_36ac_5bfc3582bcf2 style fb803bf1_8eb0_ccf2_8a51_cb3491520f0b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/AbstractWeightedFairQueueByteDistributorDependencyTest.java lines 37–54
Answer<Void> writeAnswer(final boolean closeIfNoFrame) {
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;
state.isWriteAllowed = state.hasFrame;
if (closeIfNoFrame && !state.hasFrame) {
stream.close();
}
distributor.updateStreamableBytes(state);
return null;
}
};
}
Domain
Subdomains
Source
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/AbstractWeightedFairQueueByteDistributorDependencyTest.java.
Where is writeAnswer() defined?
writeAnswer() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/AbstractWeightedFairQueueByteDistributorDependencyTest.java at line 37.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free