testExceptionCaughtBothCombinedHandlers() — netty Function Reference
Architecture documentation for the testExceptionCaughtBothCombinedHandlers() function in CombinedChannelDuplexHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 4a75cb6e_c057_ec3c_8ef3_55970ae63ba3["testExceptionCaughtBothCombinedHandlers()"] 9460024d_25ec_0588_e029_9fb5fddbbe6d["CombinedChannelDuplexHandlerTest"] 4a75cb6e_c057_ec3c_8ef3_55970ae63ba3 -->|defined in| 9460024d_25ec_0588_e029_9fb5fddbbe6d e295aa8a_72ec_23eb_500a_11600f1269f4["exceptionCaught()"] 4a75cb6e_c057_ec3c_8ef3_55970ae63ba3 -->|calls| e295aa8a_72ec_23eb_500a_11600f1269f4 style 4a75cb6e_c057_ec3c_8ef3_55970ae63ba3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/CombinedChannelDuplexHandlerTest.java lines 128–166
@Test
public void testExceptionCaughtBothCombinedHandlers() {
final Exception exception = new Exception();
final Queue<ChannelHandler> queue = new ArrayDeque<ChannelHandler>();
ChannelInboundHandler inboundHandler = new ChannelInboundHandlerAdapter() {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
assertSame(exception, cause);
queue.add(this);
ctx.fireExceptionCaught(cause);
}
};
ChannelOutboundHandler outboundHandler = new ChannelOutboundHandlerAdapter() {
@SuppressWarnings("deprecation")
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
assertSame(exception, cause);
queue.add(this);
ctx.fireExceptionCaught(cause);
}
};
ChannelInboundHandler lastHandler = new ChannelInboundHandlerAdapter() {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
assertSame(exception, cause);
queue.add(this);
}
};
EmbeddedChannel channel = new EmbeddedChannel(
new CombinedChannelDuplexHandler<ChannelInboundHandler, ChannelOutboundHandler>(
inboundHandler, outboundHandler), lastHandler);
channel.pipeline().fireExceptionCaught(exception);
assertFalse(channel.finish());
assertSame(inboundHandler, queue.poll());
assertSame(outboundHandler, queue.poll());
assertSame(lastHandler, queue.poll());
assertTrue(queue.isEmpty());
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testExceptionCaughtBothCombinedHandlers() do?
testExceptionCaughtBothCombinedHandlers() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/CombinedChannelDuplexHandlerTest.java.
Where is testExceptionCaughtBothCombinedHandlers() defined?
testExceptionCaughtBothCombinedHandlers() is defined in transport/src/test/java/io/netty/channel/CombinedChannelDuplexHandlerTest.java at line 128.
What does testExceptionCaughtBothCombinedHandlers() call?
testExceptionCaughtBothCombinedHandlers() calls 1 function(s): exceptionCaught.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free