setupServer() — netty Function Reference
Architecture documentation for the setupServer() function in SSLEngineTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c1ea24b4_912a_5bc9_eb9f_d097c21e00d3["setupServer()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b["SSLEngineTest"] c1ea24b4_912a_5bc9_eb9f_d097c21e00d3 -->|defined in| 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b 7338e064_e0a3_a619_2b64_27a2587698a9["setupHandlers()"] 7338e064_e0a3_a619_2b64_27a2587698a9 -->|calls| c1ea24b4_912a_5bc9_eb9f_d097c21e00d3 36e8a3de_0260_c1f5_21e4_67bbf63cb1f0["mustCallResumeTrustedOnSessionResumption()"] 36e8a3de_0260_c1f5_21e4_67bbf63cb1f0 -->|calls| c1ea24b4_912a_5bc9_eb9f_d097c21e00d3 00852079_bb8f_3799_f1ac_a89eb99030cf["mustFailHandshakePromiseIfResumeServerTrustedThrows()"] 00852079_bb8f_3799_f1ac_a89eb99030cf -->|calls| c1ea24b4_912a_5bc9_eb9f_d097c21e00d3 113b5345_411b_23dc_dd32_c73e87f2c618["mustFailHandshakePromiseIfResumeClientTrustedThrows()"] 113b5345_411b_23dc_dd32_c73e87f2c618 -->|calls| c1ea24b4_912a_5bc9_eb9f_d097c21e00d3 e47c4b64_0af5_d342_1514_ecf0991f0c2a["mustNotCallResumeWhenClientAuthIsOptionalAndNoClientCertIsProvided()"] e47c4b64_0af5_d342_1514_ecf0991f0c2a -->|calls| c1ea24b4_912a_5bc9_eb9f_d097c21e00d3 d074ce38_190b_dae8_46f6_82b7c5e7ecaf["TestByteBufAllocator()"] c1ea24b4_912a_5bc9_eb9f_d097c21e00d3 -->|calls| d074ce38_190b_dae8_46f6_82b7c5e7ecaf e3264542_e539_15fe_6edf_a60fa8537434["MessageDelegatorChannelHandler()"] c1ea24b4_912a_5bc9_eb9f_d097c21e00d3 -->|calls| e3264542_e539_15fe_6edf_a60fa8537434 style c1ea24b4_912a_5bc9_eb9f_d097c21e00d3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java lines 1919–1953
private void setupServer(final BufferType type, final boolean delegate) {
serverConnectedChannel = null;
sb = new ServerBootstrap();
sb.group(new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()));
sb.channel(NioServerSocketChannel.class);
sb.childHandler(new ChannelInitializer<Channel>() {
@Override
protected void initChannel(Channel ch) throws Exception {
ch.config().setAllocator(new TestByteBufAllocator(ch.config().getAllocator(), type));
ChannelPipeline p = ch.pipeline();
SslHandler sslHandler = !delegate ?
serverSslCtx.newHandler(ch.alloc()) :
serverSslCtx.newHandler(ch.alloc(), delegatingExecutor);
serverSslHandshakeFuture = sslHandler.handshakeFuture();
p.addLast(sslHandler);
p.addLast(new MessageDelegatorChannelHandler(serverReceiver, serverLatch));
p.addLast(new ChannelInboundHandlerAdapter() {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
if (cause.getCause() instanceof SSLHandshakeException) {
serverException = cause.getCause();
serverLatch.countDown();
} else {
ctx.fireExceptionCaught(cause);
}
}
});
serverConnectedChannel = ch;
}
});
serverChannel = sb.bind(new InetSocketAddress(0)).syncUninterruptibly().channel();
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does setupServer() do?
setupServer() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java.
Where is setupServer() defined?
setupServer() is defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java at line 1919.
What does setupServer() call?
setupServer() calls 2 function(s): MessageDelegatorChannelHandler, TestByteBufAllocator.
What calls setupServer()?
setupServer() is called by 5 function(s): mustCallResumeTrustedOnSessionResumption, mustFailHandshakePromiseIfResumeClientTrustedThrows, mustFailHandshakePromiseIfResumeServerTrustedThrows, mustNotCallResumeWhenClientAuthIsOptionalAndNoClientCertIsProvided, setupHandlers.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free