Home / Function/ testReentrantClose() — netty Function Reference

testReentrantClose() — netty Function Reference

Architecture documentation for the testReentrantClose() function in EmbeddedChannelTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  cb5327ad_f786_b01c_61cc_9f91191eb772["testReentrantClose()"]
  300cabef_b042_697f_5623_37ce249f504d["EmbeddedChannelTest"]
  cb5327ad_f786_b01c_61cc_9f91191eb772 -->|defined in| 300cabef_b042_697f_5623_37ce249f504d
  4fc8a753_5665_2ca5_69db_dc1006272b05["close()"]
  cb5327ad_f786_b01c_61cc_9f91191eb772 -->|calls| 4fc8a753_5665_2ca5_69db_dc1006272b05
  style cb5327ad_f786_b01c_61cc_9f91191eb772 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/embedded/EmbeddedChannelTest.java lines 795–820

    @Test
    void testReentrantClose() {
        EmbeddedChannel channel = new EmbeddedChannel();
        channel.pipeline().addLast(new ChannelInboundHandlerAdapter() {
            boolean runningRead;

            @Override
            public void channelRead(ChannelHandlerContext ctx, Object msg) {
                runningRead = true;
                try {
                    ctx.channel().close();
                } finally {
                    runningRead = false;
                }
            }

            @Override
            public void handlerRemoved(ChannelHandlerContext ctx) {
                if (runningRead) {
                    throw new IllegalStateException("Reentrant handlerRemoved");
                }
            }
        });
        channel.writeInbound("foo");
        channel.checkException();
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testReentrantClose() do?
testReentrantClose() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/embedded/EmbeddedChannelTest.java.
Where is testReentrantClose() defined?
testReentrantClose() is defined in transport/src/test/java/io/netty/channel/embedded/EmbeddedChannelTest.java at line 795.
What does testReentrantClose() call?
testReentrantClose() calls 1 function(s): close.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free