DefaultChannelPipelineTailTest Class — netty Architecture
Architecture documentation for the DefaultChannelPipelineTailTest class in DefaultChannelPipelineTailTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 1e1d5fac_cddb_8f70_03a2_361ddab1ee33["DefaultChannelPipelineTailTest"] e9b8adde_202e_6f4a_2389_d2ca9ac6186c["DefaultChannelPipelineTailTest.java"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 -->|defined in| e9b8adde_202e_6f4a_2389_d2ca9ac6186c f7b33040_f5b2_3458_f410_cc33978e8aa9["init()"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 -->|method| f7b33040_f5b2_3458_f410_cc33978e8aa9 4377a52a_c874_c53a_d4ef_9f2c002f97ed["destroy()"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 -->|method| 4377a52a_c874_c53a_d4ef_9f2c002f97ed a6acfbdc_9124_9e19_c7f9_ab047922ce48["testOnUnhandledInboundChannelActive()"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 -->|method| a6acfbdc_9124_9e19_c7f9_ab047922ce48 a8aee91e_0e7c_21e7_d741_fcd118ff2e73["testOnUnhandledInboundChannelInactive()"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 -->|method| a8aee91e_0e7c_21e7_d741_fcd118ff2e73 f0e8730c_b2d8_ff95_e275_cc8fb6cc2adc["testOnUnhandledInboundException()"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 -->|method| f0e8730c_b2d8_ff95_e275_cc8fb6cc2adc fdfb6300_df24_1534_b934_06bf3c8a7b44["testOnUnhandledInboundMessage()"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 -->|method| fdfb6300_df24_1534_b934_06bf3c8a7b44 8dbac1db_bf55_0839_112d_06934f3eca62["testOnUnhandledInboundReadComplete()"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 -->|method| 8dbac1db_bf55_0839_112d_06934f3eca62 7f08b0e1_3dc0_d0ab_f21c_cb70e6e1bf16["testOnUnhandledInboundUserEventTriggered()"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 -->|method| 7f08b0e1_3dc0_d0ab_f21c_cb70e6e1bf16 f05f1cb0_52fc_d2e5_b1f5_1575f9ea4c50["testOnUnhandledInboundWritabilityChanged()"] 1e1d5fac_cddb_8f70_03a2_361ddab1ee33 -->|method| f05f1cb0_52fc_d2e5_b1f5_1575f9ea4c50
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/DefaultChannelPipelineTailTest.java lines 35–409
public class DefaultChannelPipelineTailTest {
private static EventLoopGroup GROUP;
@BeforeAll
public static void init() {
GROUP = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
}
@AfterAll
public static void destroy() {
GROUP.shutdownGracefully();
}
@Test
public void testOnUnhandledInboundChannelActive() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
MyChannel myChannel = new MyChannel() {
@Override
protected void onUnhandledInboundChannelActive() {
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 {
assertTrue(latch.await(1L, TimeUnit.SECONDS));
} finally {
channel.close();
}
}
@Test
public void testOnUnhandledInboundChannelInactive() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
MyChannel myChannel = new MyChannel() {
@Override
protected void onUnhandledInboundChannelInactive() {
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();
channel.close().syncUninterruptibly();
assertTrue(latch.await(1L, TimeUnit.SECONDS));
}
@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));
Source
Frequently Asked Questions
What is the DefaultChannelPipelineTailTest class?
DefaultChannelPipelineTailTest is a class in the netty codebase, defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTailTest.java.
Where is DefaultChannelPipelineTailTest defined?
DefaultChannelPipelineTailTest is defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTailTest.java at line 35.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free