run() — netty Function Reference
Architecture documentation for the run() function in UDTClientServerConnectionTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 15c7489b_6c9b_a2f1_adb8_b6985fa97a5b["run()"] 89c0e406_7a8e_03fe_792e_9782b3deaad6["Server"] 15c7489b_6c9b_a2f1_adb8_b6985fa97a5b -->|defined in| 89c0e406_7a8e_03fe_792e_9782b3deaad6 96b8c4e6_d3c3_17d6_a8c3_a91250f3642c["run()"] 96b8c4e6_d3c3_17d6_a8c3_a91250f3642c -->|calls| 15c7489b_6c9b_a2f1_adb8_b6985fa97a5b 96b8c4e6_d3c3_17d6_a8c3_a91250f3642c["run()"] 15c7489b_6c9b_a2f1_adb8_b6985fa97a5b -->|calls| 96b8c4e6_d3c3_17d6_a8c3_a91250f3642c 8448c2db_94fb_5244_3672_c8968560511e["ServerHandler()"] 15c7489b_6c9b_a2f1_adb8_b6985fa97a5b -->|calls| 8448c2db_94fb_5244_3672_c8968560511e 632a767d_e337_a2b4_e179_e0d936c7c46f["waitForRunning()"] 15c7489b_6c9b_a2f1_adb8_b6985fa97a5b -->|calls| 632a767d_e337_a2b4_e179_e0d936c7c46f style 15c7489b_6c9b_a2f1_adb8_b6985fa97a5b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
testsuite/src/main/java/io/netty/testsuite/transport/udt/UDTClientServerConnectionTest.java lines 198–239
@Override
public void run() {
final ServerBootstrap boot = new ServerBootstrap();
final ThreadFactory factory = new DefaultThreadFactory("udp");
final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(1,
factory, NioIoHandler.newFactory(NioUdtProvider.BYTE_PROVIDER));
try {
boot.group(eventLoopGroup)
.channelFactory(NioUdtProvider.BYTE_ACCEPTOR)
.childHandler(new ChannelInitializer<UdtChannel>() {
@Override
protected void initChannel(final UdtChannel ch)
throws Exception {
final ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast("framer",
new DelimiterBasedFrameDecoder(8192,
Delimiters.lineDelimiter()));
pipeline.addLast("decoder", new StringDecoder(
CharsetUtil.UTF_8));
pipeline.addLast("encoder", new StringEncoder(
CharsetUtil.UTF_8));
pipeline.addLast("handler", new ServerHandler(
group));
}
});
channel = boot.bind(address).sync().channel();
isRunning = true;
log.info("Server ready.");
waitForRunning(false);
log.info("Server closing acceptor...");
channel.close().sync();
log.info("Server closing connectors...");
group.close().sync();
isShutdown = true;
log.info("Server is done.");
} catch (final Throwable e) {
log.error("Server failure.", e);
} finally {
eventLoopGroup.shutdownGracefully();
eventLoopGroup.terminationFuture().syncUninterruptibly();
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does run() do?
run() is a function in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/udt/UDTClientServerConnectionTest.java.
Where is run() defined?
run() is defined in testsuite/src/main/java/io/netty/testsuite/transport/udt/UDTClientServerConnectionTest.java at line 198.
What does run() call?
run() calls 3 function(s): ServerHandler, run, waitForRunning.
What calls run()?
run() is called by 1 function(s): run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free