public static final class ConnectionFactory.NettyConfiguration extends Object
| Modifier and Type | Method and Description |
|---|---|
ConnectionFactory.NettyConfiguration |
bootstrapCustomizer(Consumer<io.netty.bootstrap.Bootstrap> bootstrapCustomizer)
An extension point to customize Netty's
Bootstraps used to configure connections. |
ConnectionFactory.NettyConfiguration |
channelCustomizer(Consumer<io.netty.channel.Channel> channelCustomizer)
An extension point to customize Netty's
Channels used for
connections. |
ConnectionFactory |
connectionFactory()
Go back to the connection factory.
|
ConnectionFactory.NettyConfiguration |
enqueuingTimeout(Duration enqueuingTimeout)
Set the timeout to enqueue outbound frames.
|
ConnectionFactory.NettyConfiguration |
eventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
Set the
EventLoopGroup shared by all the connections created with
this connection factory. |
ConnectionFactory.NettyConfiguration |
sslContext(io.netty.handler.ssl.SslContext sslContext)
Netty
SslContext for TLS connections. |
ConnectionFactory.NettyConfiguration |
sslContextFactory(Function<String,io.netty.handler.ssl.SslContext> sslContextFactory)
A factory to create
SslContext depending on the connection name. |
public ConnectionFactory.NettyConfiguration eventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
EventLoopGroup shared by all the connections created with
this connection factory.
A connection uses a one-thread NIO event loop group if none is provided. It disposes it when it closes itself.
It is recommended to set an event loop group with an appropriate number of threads if connection factory is meant to create a significant number of connections.
It is the developer's responsibility to close the event loop group they provide.
eventLoopGroup - the event loop group to usepublic ConnectionFactory.NettyConfiguration channelCustomizer(Consumer<io.netty.channel.Channel> channelCustomizer)
Channels used for
connections.channelCustomizer - the customization callbackpublic ConnectionFactory.NettyConfiguration bootstrapCustomizer(Consumer<io.netty.bootstrap.Bootstrap> bootstrapCustomizer)
Bootstraps used to configure connections.bootstrapCustomizer - the bootstrap customization callbackpublic ConnectionFactory.NettyConfiguration sslContext(io.netty.handler.ssl.SslContext sslContext)
SslContext for TLS connections.
Use SslContextBuilder.forClient() to configure and create an instance.
sslContext - the SSL contextpublic ConnectionFactory.NettyConfiguration sslContextFactory(Function<String,io.netty.handler.ssl.SslContext> sslContextFactory)
SslContext depending on the connection name.sslContextFactory - the factorypublic ConnectionFactory.NettyConfiguration enqueuingTimeout(Duration enqueuingTimeout)
Default is 10 seconds.
enqueuingTimeout - the enqueuing timeoutpublic ConnectionFactory connectionFactory()
Copyright © 2025 Broadcom Inc. and its subsidiaries.. All rights reserved.