Home / Function/ teardown() — netty Function Reference

teardown() — netty Function Reference

Architecture documentation for the teardown() function in HttpToHttp2ConnectionHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  2f19ad74_5125_180f_9d2e_b6dced110632["teardown()"]
  919b1457_fbee_0bc0_c865_945a03b794b1["HttpToHttp2ConnectionHandlerTest"]
  2f19ad74_5125_180f_9d2e_b6dced110632 -->|defined in| 919b1457_fbee_0bc0_c865_945a03b794b1
  style 2f19ad74_5125_180f_9d2e_b6dced110632 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/HttpToHttp2ConnectionHandlerTest.java lines 107–128

    @AfterEach
    public void teardown() throws Exception {
        if (clientChannel != null) {
            clientChannel.close().syncUninterruptibly();
            clientChannel = null;
        }
        if (serverChannel != null) {
            serverChannel.close().syncUninterruptibly();
            serverChannel = null;
        }
        final Channel serverConnectedChannel = this.serverConnectedChannel;
        if (serverConnectedChannel != null) {
            serverConnectedChannel.close().syncUninterruptibly();
            this.serverConnectedChannel = null;
        }
        Future<?> serverGroup = sb.config().group().shutdownGracefully(0, 5, SECONDS);
        Future<?> serverChildGroup = sb.config().childGroup().shutdownGracefully(0, 5, SECONDS);
        Future<?> clientGroup = cb.config().group().shutdownGracefully(0, 5, SECONDS);
        serverGroup.syncUninterruptibly();
        serverChildGroup.syncUninterruptibly();
        clientGroup.syncUninterruptibly();
    }

Domain

Subdomains

Frequently Asked Questions

What does teardown() do?
teardown() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/HttpToHttp2ConnectionHandlerTest.java.
Where is teardown() defined?
teardown() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/HttpToHttp2ConnectionHandlerTest.java at line 107.

Analyze Your Own Codebase

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

Try Supermodel Free