Home / Function/ init() — netty Function Reference

init() — netty Function Reference

Architecture documentation for the init() function in LocalTransportThreadModelTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  1bd859c5_a859_6819_c97f_7afc68bc6800["init()"]
  add8e01e_0953_6b0c_04ac_ba726a788b93["LocalTransportThreadModelTest"]
  1bd859c5_a859_6819_c97f_7afc68bc6800 -->|defined in| add8e01e_0953_6b0c_04ac_ba726a788b93
  6348c4c7_af5b_1906_cb20_8d15cf666108["channelRead()"]
  1bd859c5_a859_6819_c97f_7afc68bc6800 -->|calls| 6348c4c7_af5b_1906_cb20_8d15cf666108
  style 1bd859c5_a859_6819_c97f_7afc68bc6800 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/local/LocalTransportThreadModelTest.java lines 56–77

    @BeforeAll
    public static void init() {
        // Configure a test server
        group = new MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory());
        ServerBootstrap sb = new ServerBootstrap();
        sb.group(group)
          .channel(LocalServerChannel.class)
          .childHandler(new ChannelInitializer<LocalChannel>() {
              @Override
              public void initChannel(LocalChannel ch) throws Exception {
                  ch.pipeline().addLast(new ChannelInboundHandlerAdapter() {
                      @Override
                      public void channelRead(ChannelHandlerContext ctx, Object msg) {
                          // Discard
                          ReferenceCountUtil.release(msg);
                      }
                  });
              }
          });

        localAddr = (LocalAddress) sb.bind(LocalAddress.ANY).syncUninterruptibly().channel().localAddress();
    }

Domain

Subdomains

Frequently Asked Questions

What does init() do?
init() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/local/LocalTransportThreadModelTest.java.
Where is init() defined?
init() is defined in transport/src/test/java/io/netty/channel/local/LocalTransportThreadModelTest.java at line 56.
What does init() call?
init() calls 1 function(s): channelRead.

Analyze Your Own Codebase

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

Try Supermodel Free