HugeDecompressIncomingHandler Class — netty Architecture
Architecture documentation for the HugeDecompressIncomingHandler class in AbstractIntegrationTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 23f03573_b851_c870_3be9_7c0aa62308f5["HugeDecompressIncomingHandler"] 3fe16f61_c605_6938_ab4c_9085cd64f298["AbstractIntegrationTest.java"] 23f03573_b851_c870_3be9_7c0aa62308f5 -->|defined in| 3fe16f61_c605_6938_ab4c_9085cd64f298 75c355fd_0bf1_2415_e932_0c42e579026a["HugeDecompressIncomingHandler()"] 23f03573_b851_c870_3be9_7c0aa62308f5 -->|method| 75c355fd_0bf1_2415_e932_0c42e579026a 5b2a0615_798d_5801_6548_0143e43f55b0["channelRead()"] 23f03573_b851_c870_3be9_7c0aa62308f5 -->|method| 5b2a0615_798d_5801_6548_0143e43f55b0 e930b66e_a0b2_dc77_11fb_89de13784bb7["process()"] 23f03573_b851_c870_3be9_7c0aa62308f5 -->|method| e930b66e_a0b2_dc77_11fb_89de13784bb7
Relationship Graph
Source Code
codec-compression/src/test/java/io/netty/handler/codec/compression/AbstractIntegrationTest.java lines 236–266
private static final class HugeDecompressIncomingHandler
extends ChannelInboundHandlerAdapter implements ByteProcessor {
final int memoryLimit;
final MessageDigest digest;
long total;
HugeDecompressIncomingHandler(int memoryLimit, MessageDigest digest) {
this.memoryLimit = memoryLimit;
this.digest = digest;
}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
ByteBuf buf = (ByteBuf) msg;
total += buf.readableBytes();
try {
buf.forEachByte(this);
PooledByteBufAllocator allocator = (PooledByteBufAllocator) ctx.alloc();
assertThat(allocator.metric().usedHeapMemory()).isLessThan(memoryLimit);
assertThat(allocator.metric().usedDirectMemory()).isLessThan(memoryLimit);
} finally {
buf.release();
}
}
@Override
public boolean process(byte value) throws Exception {
digest.update(value);
return true;
}
}
Defined In
Source
Frequently Asked Questions
What is the HugeDecompressIncomingHandler class?
HugeDecompressIncomingHandler is a class in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/AbstractIntegrationTest.java.
Where is HugeDecompressIncomingHandler defined?
HugeDecompressIncomingHandler is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/AbstractIntegrationTest.java at line 236.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free