setupClient() — netty Function Reference
Architecture documentation for the setupClient() function in SSLEngineTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5b1d05e1_aa74_d249_3836_8b69b42f579f["setupClient()"] 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b["SSLEngineTest"] 5b1d05e1_aa74_d249_3836_8b69b42f579f -->|defined in| 9150c92a_2afc_b83a_c3bf_86dfac6e9d9b 7338e064_e0a3_a619_2b64_27a2587698a9["setupHandlers()"] 7338e064_e0a3_a619_2b64_27a2587698a9 -->|calls| 5b1d05e1_aa74_d249_3836_8b69b42f579f 36e8a3de_0260_c1f5_21e4_67bbf63cb1f0["mustCallResumeTrustedOnSessionResumption()"] 36e8a3de_0260_c1f5_21e4_67bbf63cb1f0 -->|calls| 5b1d05e1_aa74_d249_3836_8b69b42f579f 00852079_bb8f_3799_f1ac_a89eb99030cf["mustFailHandshakePromiseIfResumeServerTrustedThrows()"] 00852079_bb8f_3799_f1ac_a89eb99030cf -->|calls| 5b1d05e1_aa74_d249_3836_8b69b42f579f 113b5345_411b_23dc_dd32_c73e87f2c618["mustFailHandshakePromiseIfResumeClientTrustedThrows()"] 113b5345_411b_23dc_dd32_c73e87f2c618 -->|calls| 5b1d05e1_aa74_d249_3836_8b69b42f579f e47c4b64_0af5_d342_1514_ecf0991f0c2a["mustNotCallResumeWhenClientAuthIsOptionalAndNoClientCertIsProvided()"] e47c4b64_0af5_d342_1514_ecf0991f0c2a -->|calls| 5b1d05e1_aa74_d249_3836_8b69b42f579f d074ce38_190b_dae8_46f6_82b7c5e7ecaf["TestByteBufAllocator()"] 5b1d05e1_aa74_d249_3836_8b69b42f579f -->|calls| d074ce38_190b_dae8_46f6_82b7c5e7ecaf e3264542_e539_15fe_6edf_a60fa8537434["MessageDelegatorChannelHandler()"] 5b1d05e1_aa74_d249_3836_8b69b42f579f -->|calls| e3264542_e539_15fe_6edf_a60fa8537434 style 5b1d05e1_aa74_d249_3836_8b69b42f579f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java lines 1955–1997
private void setupClient(final BufferType type, final boolean delegate, final String host, final int port) {
cb = new Bootstrap();
cb.group(new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()));
cb.channel(NioSocketChannel.class);
cb.handler(new ChannelInitializer<Channel>() {
@Override
protected void initChannel(Channel ch) throws Exception {
TestByteBufAllocator alloc = new TestByteBufAllocator(ch.config().getAllocator(), type);
ch.config().setAllocator(alloc);
ChannelPipeline p = ch.pipeline();
final SslHandler sslHandler;
if (!delegate) {
sslHandler = host != null ? clientSslCtx.newHandler(alloc, host, port) :
clientSslCtx.newHandler(alloc);
} else {
sslHandler = host != null ? clientSslCtx.newHandler(alloc, host, port, delegatingExecutor) :
clientSslCtx.newHandler(alloc, delegatingExecutor);
}
clientSslHandshakeFuture = sslHandler.handshakeFuture();
p.addLast(sslHandler);
p.addLast(new MessageDelegatorChannelHandler(clientReceiver, clientLatch));
p.addLast(new ChannelInboundHandlerAdapter() {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
if (cause.getCause() instanceof SSLHandshakeException) {
clientException = cause.getCause();
clientLatch.countDown();
} else {
ctx.fireExceptionCaught(cause);
}
}
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
clientLatch.countDown();
}
});
}
});
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does setupClient() do?
setupClient() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java.
Where is setupClient() defined?
setupClient() is defined in handler/src/test/java/io/netty/handler/ssl/SSLEngineTest.java at line 1955.
What does setupClient() call?
setupClient() calls 2 function(s): MessageDelegatorChannelHandler, TestByteBufAllocator.
What calls setupClient()?
setupClient() 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