Home / Function/ testReadCompleteCalledOnHandle() — netty Function Reference

testReadCompleteCalledOnHandle() — netty Function Reference

Architecture documentation for the testReadCompleteCalledOnHandle() function in LocalChannelTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  218f8064_475e_be3f_7a13_432762e66eee["testReadCompleteCalledOnHandle()"]
  d7e5442a_9b99_814d_2bd6_0be57237db65["LocalChannelTest"]
  218f8064_475e_be3f_7a13_432762e66eee -->|defined in| d7e5442a_9b99_814d_2bd6_0be57237db65
  1676a898_26d5_cddd_6343_42c868715667["ReadCompleteRecvAllocator()"]
  218f8064_475e_be3f_7a13_432762e66eee -->|calls| 1676a898_26d5_cddd_6343_42c868715667
  d3c8aa54_ac5d_6944_e789_c2c22ce16089["closeChannel()"]
  218f8064_475e_be3f_7a13_432762e66eee -->|calls| d3c8aa54_ac5d_6944_e789_c2c22ce16089
  style 218f8064_475e_be3f_7a13_432762e66eee fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/local/LocalChannelTest.java lines 1255–1300

    @Test
    public void testReadCompleteCalledOnHandle() throws Exception {
        Bootstrap cb = new Bootstrap();
        ServerBootstrap sb = new ServerBootstrap();

        cb.group(sharedGroup)
                .channel(LocalChannel.class)
                .handler(new ChannelInitializer<Channel>() {
                    @Override
                    protected void initChannel(Channel ch) {
                        // NOOP
                    }
                });

        CountDownLatch serverLatch = new CountDownLatch(1);
        CountDownLatch childLatch = new CountDownLatch(1);

        sb.group(sharedGroup)
                .channel(LocalServerChannel.class)
                .option(ChannelOption.RECVBUF_ALLOCATOR, new ReadCompleteRecvAllocator(serverLatch))
                .childHandler(new ChannelInitializer<Channel>() {
                    @Override
                    protected void initChannel(Channel ch) {
                        // NOOP
                    }
                })
                .childOption(ChannelOption.RECVBUF_ALLOCATOR, new ReadCompleteRecvAllocator(childLatch));

        Channel sc = null;
        Channel cc = null;
        try {
            // Start server
            sc = sb.bind(TEST_ADDRESS).sync().channel();
            try {
                cc = cb.connect(TEST_ADDRESS).sync().channel();
                cc.writeAndFlush("msg").sync();
            } finally {
                closeChannel(cc);
            }

            serverLatch.await();
            childLatch.await();
        } finally {
            closeChannel(sc);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testReadCompleteCalledOnHandle() do?
testReadCompleteCalledOnHandle() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/local/LocalChannelTest.java.
Where is testReadCompleteCalledOnHandle() defined?
testReadCompleteCalledOnHandle() is defined in transport/src/test/java/io/netty/channel/local/LocalChannelTest.java at line 1255.
What does testReadCompleteCalledOnHandle() call?
testReadCompleteCalledOnHandle() calls 2 function(s): ReadCompleteRecvAllocator, closeChannel.

Analyze Your Own Codebase

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

Try Supermodel Free