Home / Function/ run() — netty Function Reference

run() — netty Function Reference

Architecture documentation for the run() function in ByteEchoPeerBase.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  a332caff_4f20_e293_c8ce_8c8f1590919c["run()"]
  379bebcd_d565_3dae_c6b9_313138d1f960["ByteEchoPeerBase"]
  a332caff_4f20_e293_c8ce_8c8f1590919c -->|defined in| 379bebcd_d565_3dae_c6b9_313138d1f960
  style a332caff_4f20_e293_c8ce_8c8f1590919c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/udt/echo/rendezvousBytes/ByteEchoPeerBase.java lines 54–75

    public void run() throws Exception {
        final ThreadFactory connectFactory = new DefaultThreadFactory("rendezvous");
        final EventLoopGroup connectGroup = new MultiThreadIoEventLoopGroup(1,
                connectFactory, NioIoHandler.newFactory(NioUdtProvider.BYTE_PROVIDER));
        try {
            final Bootstrap bootstrap = new Bootstrap();
            bootstrap.group(connectGroup)
                    .channelFactory(NioUdtProvider.BYTE_RENDEZVOUS)
                    .handler(new ChannelInitializer<UdtChannel>() {
                        @Override
                        protected void initChannel(UdtChannel ch) throws Exception {
                            ch.pipeline().addLast(
                                    new LoggingHandler(LogLevel.INFO),
                                    new ByteEchoPeerHandler(messageSize));
                        }
                    });
            final ChannelFuture future = bootstrap.connect(peerAddress, myAddress).sync();
            future.channel().closeFuture().sync();
        } finally {
            connectGroup.shutdownGracefully();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does run() do?
run() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/udt/echo/rendezvousBytes/ByteEchoPeerBase.java.
Where is run() defined?
run() is defined in example/src/main/java/io/netty/example/udt/echo/rendezvousBytes/ByteEchoPeerBase.java at line 54.

Analyze Your Own Codebase

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

Try Supermodel Free