testTransport() — netty Function Reference
Architecture documentation for the testTransport() function in HttpNativeServer.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f6ad4c3c_5e38_b874_f209_c0cafcbf4077["testTransport()"] 3b94d628_ec03_4964_2e12_08b49e8b8b30["HttpNativeServer"] f6ad4c3c_5e38_b874_f209_c0cafcbf4077 -->|defined in| 3b94d628_ec03_4964_2e12_08b49e8b8b30 45f1144f_5b41_1877_954c_568d5cc6d1c4["main()"] 45f1144f_5b41_1877_954c_568d5cc6d1c4 -->|calls| f6ad4c3c_5e38_b874_f209_c0cafcbf4077 96e01bcf_bb4e_5979_6c50_313f5fa240b5["chooseServerChannelClass()"] f6ad4c3c_5e38_b874_f209_c0cafcbf4077 -->|calls| 96e01bcf_bb4e_5979_6c50_313f5fa240b5 c11a7e9d_4a3b_6ccd_5b4d_c1a8a682fae4["chooseChannelClass()"] f6ad4c3c_5e38_b874_f209_c0cafcbf4077 -->|calls| c11a7e9d_4a3b_6ccd_5b4d_c1a8a682fae4 style f6ad4c3c_5e38_b874_f209_c0cafcbf4077 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
testsuite-native-image/src/main/java/io/netty/testsuite/svm/HttpNativeServer.java lines 77–112
public static boolean testTransport(TransportType ioType, AllocatorType allocatorType) throws Exception {
// Configure the server.
EventLoopGroup group = new MultiThreadIoEventLoopGroup(chooseFactory(ioType));
// Control status.
boolean serverStartSucess = false;
try {
CompletableFuture<Void> httpRequestFuture = new CompletableFuture<>();
ServerBootstrap b = new ServerBootstrap();
b.option(ChannelOption.SO_BACKLOG, 1024);
b.group(group)
.channel(chooseServerChannelClass(ioType))
.handler(new LoggingHandler(LogLevel.INFO))
.childOption(ChannelOption.ALLOCATOR, chooseAllocator(allocatorType))
.childHandler(new HttpNativeServerInitializer(httpRequestFuture));
Channel channel = b.bind(0).sync().channel();
System.err.println("Server started, will shutdown now.");
Channel httpClient = new HttpNativeClient(
((InetSocketAddress) channel.localAddress()).getPort(),
group, chooseChannelClass(ioType)
).initClient();
DefaultFullHttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/hello");
httpClient.writeAndFlush(request).sync();
httpRequestFuture.get();
channel.close().sync();
httpClient.close().sync();
serverStartSucess = true;
} finally {
group.shutdownGracefully();
}
return serverStartSucess;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does testTransport() do?
testTransport() is a function in the netty codebase, defined in testsuite-native-image/src/main/java/io/netty/testsuite/svm/HttpNativeServer.java.
Where is testTransport() defined?
testTransport() is defined in testsuite-native-image/src/main/java/io/netty/testsuite/svm/HttpNativeServer.java at line 77.
What does testTransport() call?
testTransport() calls 2 function(s): chooseChannelClass, chooseServerChannelClass.
What calls testTransport()?
testTransport() is called by 1 function(s): main.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free