HexDumpProxyBackendHandler Class — netty Architecture
Architecture documentation for the HexDumpProxyBackendHandler class in HexDumpProxyBackendHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 2a51dc91_841b_333a_8075_dff2cd8c2da7["HexDumpProxyBackendHandler"] c5df0cdc_b9ab_63b1_8268_c9ba9663c37e["HexDumpProxyBackendHandler.java"] 2a51dc91_841b_333a_8075_dff2cd8c2da7 -->|defined in| c5df0cdc_b9ab_63b1_8268_c9ba9663c37e e0e73a54_58f4_f570_6b42_d3e78f950e56["HexDumpProxyBackendHandler()"] 2a51dc91_841b_333a_8075_dff2cd8c2da7 -->|method| e0e73a54_58f4_f570_6b42_d3e78f950e56 1a0072cf_de94_da47_13c6_1fee03b74bab["channelActive()"] 2a51dc91_841b_333a_8075_dff2cd8c2da7 -->|method| 1a0072cf_de94_da47_13c6_1fee03b74bab 18e2d099_5d38_7c1f_2c9a_f340122a6278["channelRead()"] 2a51dc91_841b_333a_8075_dff2cd8c2da7 -->|method| 18e2d099_5d38_7c1f_2c9a_f340122a6278 563cf629_acbe_b5ee_1551_940beeead7bc["channelInactive()"] 2a51dc91_841b_333a_8075_dff2cd8c2da7 -->|method| 563cf629_acbe_b5ee_1551_940beeead7bc f3f0840d_bfe0_1df2_513f_801eb1ddadb9["exceptionCaught()"] 2a51dc91_841b_333a_8075_dff2cd8c2da7 -->|method| f3f0840d_bfe0_1df2_513f_801eb1ddadb9
Relationship Graph
Source Code
example/src/main/java/io/netty/example/proxy/HexDumpProxyBackendHandler.java lines 22–60
public class HexDumpProxyBackendHandler extends ChannelInboundHandlerAdapter {
private final Channel inboundChannel;
public HexDumpProxyBackendHandler(Channel inboundChannel) {
this.inboundChannel = inboundChannel;
}
@Override
public void channelActive(ChannelHandlerContext ctx) {
if (!inboundChannel.isActive()) {
HexDumpProxyFrontendHandler.closeOnFlush(ctx.channel());
} else {
ctx.read();
}
}
@Override
public void channelRead(final ChannelHandlerContext ctx, Object msg) {
inboundChannel.writeAndFlush(msg).addListener(future -> {
if (future.isSuccess()) {
ctx.read();
} else {
ctx.close();
}
});
}
@Override
public void channelInactive(ChannelHandlerContext ctx) {
HexDumpProxyFrontendHandler.closeOnFlush(inboundChannel);
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
cause.printStackTrace();
HexDumpProxyFrontendHandler.closeOnFlush(ctx.channel());
}
}
Source
Frequently Asked Questions
What is the HexDumpProxyBackendHandler class?
HexDumpProxyBackendHandler is a class in the netty codebase, defined in example/src/main/java/io/netty/example/proxy/HexDumpProxyBackendHandler.java.
Where is HexDumpProxyBackendHandler defined?
HexDumpProxyBackendHandler is defined in example/src/main/java/io/netty/example/proxy/HexDumpProxyBackendHandler.java at line 22.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free