ReadHandler Class — netty Architecture
Architecture documentation for the ReadHandler class in FileRegionThrottleTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 986b7138_0168_bf65_b192_34b222a08a2b["ReadHandler"] b1d8c2e8_da00_2332_3992_4ef5b12182b7["FileRegionThrottleTest.java"] 986b7138_0168_bf65_b192_34b222a08a2b -->|defined in| b1d8c2e8_da00_2332_3992_4ef5b12182b7 95e7b05f_318e_eca3_e1ab_7843dbe13d9b["ReadHandler()"] 986b7138_0168_bf65_b192_34b222a08a2b -->|method| 95e7b05f_318e_eca3_e1ab_7843dbe13d9b 3a262b40_edc3_c92f_2056_cbe390ac67e0["channelRead()"] 986b7138_0168_bf65_b192_34b222a08a2b -->|method| 3a262b40_edc3_c92f_2056_cbe390ac67e0
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/traffic/FileRegionThrottleTest.java lines 139–158
private static final class ReadHandler extends ChannelInboundHandlerAdapter {
private long bytesTransferred;
private final CountDownLatch latch;
ReadHandler(CountDownLatch latch) {
this.latch = latch;
}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
if (msg instanceof ByteBuf) {
ByteBuf buf = (ByteBuf) msg;
bytesTransferred += buf.readableBytes();
buf.release();
if (bytesTransferred == tmp.length()) {
latch.countDown();
}
}
}
}
Source
Frequently Asked Questions
What is the ReadHandler class?
ReadHandler is a class in the netty codebase, defined in handler/src/test/java/io/netty/handler/traffic/FileRegionThrottleTest.java.
Where is ReadHandler defined?
ReadHandler is defined in handler/src/test/java/io/netty/handler/traffic/FileRegionThrottleTest.java at line 139.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free