Home / Class/ TlsReadTest Class — netty Architecture

TlsReadTest Class — netty Architecture

Architecture documentation for the TlsReadTest class in SslHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  8675c626_af89_6af0_f866_4d40445f8e29["TlsReadTest"]
  95d7e028_ee72_2502_f279_8411001f0ae8["SslHandlerTest.java"]
  8675c626_af89_6af0_f866_4d40445f8e29 -->|defined in| 95d7e028_ee72_2502_f279_8411001f0ae8
  8427f319_68a4_42d8_29bf_8d0215b50d46["read()"]
  8675c626_af89_6af0_f866_4d40445f8e29 -->|method| 8427f319_68a4_42d8_29bf_8d0215b50d46
  f222257e_a347_b83a_2a9e_92b868b0289d["test()"]
  8675c626_af89_6af0_f866_4d40445f8e29 -->|method| f222257e_a347_b83a_2a9e_92b868b0289d

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/SslHandlerTest.java lines 418–455

    private static final class TlsReadTest extends ChannelOutboundHandlerAdapter {
        private volatile boolean readIssued;

        @Override
        public void read(ChannelHandlerContext ctx) throws Exception {
            readIssued = true;
            super.read(ctx);
        }

        public void test(final boolean dropChannelActive) throws Exception {
            SSLEngine engine = SSLContext.getDefault().createSSLEngine();
            engine.setUseClientMode(true);

            EmbeddedChannel ch = new EmbeddedChannel(false, false,
                    this,
                    new SslHandler(engine),
                    new ChannelInboundHandlerAdapter() {
                        @Override
                        public void channelActive(ChannelHandlerContext ctx) throws Exception {
                            if (!dropChannelActive) {
                                ctx.fireChannelActive();
                            }
                        }
                    }
            );
            ch.config().setAutoRead(false);
            assertFalse(ch.config().isAutoRead());

            ch.register();

            assertTrue(readIssued);
            readIssued = false;

            assertTrue(ch.writeOutbound(Unpooled.EMPTY_BUFFER));
            assertTrue(readIssued);
            assertTrue(ch.finishAndReleaseAll());
       }
    }

Frequently Asked Questions

What is the TlsReadTest class?
TlsReadTest is a class in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SslHandlerTest.java.
Where is TlsReadTest defined?
TlsReadTest is defined in handler/src/test/java/io/netty/handler/ssl/SslHandlerTest.java at line 418.

Analyze Your Own Codebase

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

Try Supermodel Free