useReadWithoutAutoReadBuffered() — netty Function Reference
Architecture documentation for the useReadWithoutAutoReadBuffered() function in Http2MultiplexTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 333a70af_0c79_db68_d518_8bc25b9fca41["useReadWithoutAutoReadBuffered()"] 4745ff96_ed57_3bd8_9861_4b786d0b6e09["Http2MultiplexTest"] 333a70af_0c79_db68_d518_8bc25b9fca41 -->|defined in| 4745ff96_ed57_3bd8_9861_4b786d0b6e09 fa8fecc0_46e3_509f_f6b2_57a25b6ab59f["useReadWithoutAutoReadInRead()"] fa8fecc0_46e3_509f_f6b2_57a25b6ab59f -->|calls| 333a70af_0c79_db68_d518_8bc25b9fca41 748969bb_b38f_e808_290c_13ed15759a2e["useReadWithoutAutoReadInReadComplete()"] 748969bb_b38f_e808_290c_13ed15759a2e -->|calls| 333a70af_0c79_db68_d518_8bc25b9fca41 8df7745b_db2d_ef92_4b30_080373ca9f6d["verifyFramesMultiplexedToCorrectChannel()"] 333a70af_0c79_db68_d518_8bc25b9fca41 -->|calls| 8df7745b_db2d_ef92_4b30_080373ca9f6d style 333a70af_0c79_db68_d518_8bc25b9fca41 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java lines 1488–1535
private void useReadWithoutAutoReadBuffered(final boolean triggerOnReadComplete) {
LastInboundHandler inboundHandler = new LastInboundHandler();
Http2StreamChannel childChannel = newInboundStream(3, false, inboundHandler);
assertTrue(childChannel.config().isAutoRead());
childChannel.config().setAutoRead(false);
assertFalse(childChannel.config().isAutoRead());
Http2HeadersFrame headersFrame = inboundHandler.readInbound();
assertNotNull(headersFrame);
// Write some bytes to get the channel into the idle state with buffered data and also verify we
// do not dispatch it until we receive a read() call.
frameInboundWriter.writeInboundData(childChannel.stream().id(), bb("hello world"), 0, false);
frameInboundWriter.writeInboundData(childChannel.stream().id(), bb("foo"), 0, false);
frameInboundWriter.writeInboundData(childChannel.stream().id(), bb("bar"), 0, false);
// Add a handler which will request reads.
childChannel.pipeline().addFirst(new ChannelInboundHandlerAdapter() {
@Override
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
super.channelReadComplete(ctx);
if (triggerOnReadComplete) {
ctx.read();
ctx.read();
}
}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
ctx.fireChannelRead(msg);
if (!triggerOnReadComplete) {
ctx.read();
ctx.read();
}
}
});
inboundHandler.channel().read();
verifyFramesMultiplexedToCorrectChannel(childChannel, inboundHandler, 3);
frameInboundWriter.writeInboundData(childChannel.stream().id(), bb("hello world2"), 0, false);
frameInboundWriter.writeInboundData(childChannel.stream().id(), bb("foo2"), 0, false);
frameInboundWriter.writeInboundData(childChannel.stream().id(), bb("bar2"), 0, true);
verifyFramesMultiplexedToCorrectChannel(childChannel, inboundHandler, 3);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does useReadWithoutAutoReadBuffered() do?
useReadWithoutAutoReadBuffered() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java.
Where is useReadWithoutAutoReadBuffered() defined?
useReadWithoutAutoReadBuffered() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java at line 1488.
What does useReadWithoutAutoReadBuffered() call?
useReadWithoutAutoReadBuffered() calls 1 function(s): verifyFramesMultiplexedToCorrectChannel.
What calls useReadWithoutAutoReadBuffered()?
useReadWithoutAutoReadBuffered() is called by 2 function(s): useReadWithoutAutoReadInRead, useReadWithoutAutoReadInReadComplete.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free