public static class ClientOptions.Builder<BUILDER extends ClientOptions.Builder<BUILDER>> extends NettyOptions.Builder<io.netty.bootstrap.Bootstrap,ClientOptions,BUILDER>
bootstrapTemplate| Modifier | Constructor and Description |
|---|---|
protected |
Builder(io.netty.bootstrap.Bootstrap bootstrapTemplate)
Apply common option via super constructor then apply
defaultClientOptions(Bootstrap)
to the passed bootstrap. |
| Modifier and Type | Method and Description |
|---|---|
ClientOptions |
build() |
BUILDER |
connectAddress(java.util.function.Supplier<? extends java.net.SocketAddress> connectAddressSupplier)
The address to which this client should connect.
|
BUILDER |
disablePool()
Disable current
poolResources |
BUILDER |
from(ClientOptions options)
Fill the builder with attribute values from the provided options.
|
BUILDER |
get() |
BUILDER |
host(java.lang.String host)
The host to which this client should connect.
|
boolean |
isPoolAvailable() |
boolean |
isPoolDisabled() |
BUILDER |
poolResources(PoolResources poolResources)
Configures the
ChannelPool selector for the socket. |
BUILDER |
port(int port)
The port to which this client should connect.
|
BUILDER |
protocolFamily(io.netty.channel.socket.InternetProtocolFamily protocolFamily)
Configures the version family for the socket.
|
BUILDER |
proxy(java.util.function.Function<ClientProxyOptions.TypeSpec,ClientProxyOptions.Builder> proxyOptions)
The proxy configuration
|
BUILDER |
resolver(io.netty.resolver.AddressResolverGroup<?> resolver)
Assign an
AddressResolverGroup. |
BUILDER |
sslSupport()
Enable default sslContext support
|
BUILDER |
sslSupport(java.util.function.Consumer<? super io.netty.handler.ssl.SslContextBuilder> configurator)
Enable default sslContext support and enable further customization via the passed
configurator.
|
afterChannelInit, afterNettyContextInit, attr, channelGroup, eventLoopGroup, isLoopAvailable, loopResources, onChannelInit, option, preferNative, sslCloseNotifyFlushTimeout, sslCloseNotifyFlushTimeoutMillis, sslCloseNotifyReadTimeout, sslCloseNotifyReadTimeoutMillis, sslContext, sslHandshakeTimeout, sslHandshakeTimeoutMillisprotected Builder(io.netty.bootstrap.Bootstrap bootstrapTemplate)
defaultClientOptions(Bootstrap)
to the passed bootstrap.bootstrapTemplate - the bootstrap reference to usepublic final BUILDER resolver(io.netty.resolver.AddressResolverGroup<?> resolver)
AddressResolverGroup.resolver - the new AddressResolverGroupthispublic final BUILDER poolResources(PoolResources poolResources)
ChannelPool selector for the socket. Will effectively
enable client connection-pooling.poolResources - the PoolResources given
an InetSocketAddressthispublic BUILDER disablePool()
poolResourcesthispublic final boolean isPoolDisabled()
public final boolean isPoolAvailable()
public final BUILDER protocolFamily(io.netty.channel.socket.InternetProtocolFamily protocolFamily)
protocolFamily - the version family for the socket, or null for the system
default familythispublic final BUILDER sslSupport()
thispublic final BUILDER sslSupport(java.util.function.Consumer<? super io.netty.handler.ssl.SslContextBuilder> configurator)
SslContext to be passed to
NettyOptions.Builder.sslContext(SslContext).configurator - builder callback for further customization.thispublic final BUILDER host(java.lang.String host)
host - The host to connect to.thispublic final BUILDER port(int port)
port - The port to connect to.thispublic final BUILDER connectAddress(java.util.function.Supplier<? extends java.net.SocketAddress> connectAddressSupplier)
connectAddressSupplier - A supplier of the address to connect to.thispublic final BUILDER proxy(java.util.function.Function<ClientProxyOptions.TypeSpec,ClientProxyOptions.Builder> proxyOptions)
proxyOptions - the proxy configurationthispublic final BUILDER from(ClientOptions options)
NettyOptions.Builderfrom in class NettyOptions.Builder<io.netty.bootstrap.Bootstrap,ClientOptions,BUILDER extends ClientOptions.Builder<BUILDER>>options - The instance from which to copy valuesthispublic BUILDER get()
public ClientOptions build()