testOnUnhandledInboundException() — netty Function Reference
Architecture documentation for the testOnUnhandledInboundException() function in DefaultChannelPipelineTailTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f0e8730c_b2d8_ff95_e275_cc8fb6cc2adc["testOnUnhandledInboundException()"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33["DefaultChannelPipelineTailTest"] f0e8730c_b2d8_ff95_e275_cc8fb6cc2adc -->|defined in| 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 801be731_1282_4e5c_5954_a6061d6a8654["MyChannelFactory()"] f0e8730c_b2d8_ff95_e275_cc8fb6cc2adc -->|calls| 801be731_1282_4e5c_5954_a6061d6a8654 afbcb8fc_843a_b647_0bc1_53181c143d70["connect()"] f0e8730c_b2d8_ff95_e275_cc8fb6cc2adc -->|calls| afbcb8fc_843a_b647_0bc1_53181c143d70 28af635f_4fd7_00c3_dde3_78acfec86689["MyChannel()"] f0e8730c_b2d8_ff95_e275_cc8fb6cc2adc -->|calls| 28af635f_4fd7_00c3_dde3_78acfec86689 f37c280d_48f9_eba6_b048_00908e70e1e4["onUnhandledInboundException()"] f0e8730c_b2d8_ff95_e275_cc8fb6cc2adc -->|calls| f37c280d_48f9_eba6_b048_00908e70e1e4 style f0e8730c_b2d8_ff95_e275_cc8fb6cc2adc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/DefaultChannelPipelineTailTest.java lines 99–128
@Test
public void testOnUnhandledInboundException() throws Exception {
final AtomicReference<Throwable> causeRef = new AtomicReference<Throwable>();
final CountDownLatch latch = new CountDownLatch(1);
MyChannel myChannel = new MyChannel() {
@Override
protected void onUnhandledInboundException(Throwable cause) {
causeRef.set(cause);
latch.countDown();
}
};
Bootstrap bootstrap = new Bootstrap()
.channelFactory(new MyChannelFactory(myChannel))
.group(GROUP)
.handler(new ChannelInboundHandlerAdapter())
.remoteAddress(new InetSocketAddress(0));
Channel channel = bootstrap.connect()
.sync().channel();
try {
IOException ex = new IOException("testOnUnhandledInboundException");
channel.pipeline().fireExceptionCaught(ex);
assertTrue(latch.await(1L, TimeUnit.SECONDS));
assertSame(ex, causeRef.get());
} finally {
channel.close();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testOnUnhandledInboundException() do?
testOnUnhandledInboundException() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTailTest.java.
Where is testOnUnhandledInboundException() defined?
testOnUnhandledInboundException() is defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTailTest.java at line 99.
What does testOnUnhandledInboundException() call?
testOnUnhandledInboundException() calls 4 function(s): MyChannel, MyChannelFactory, connect, onUnhandledInboundException.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free