Package reactor.netty.transport
Class ClientTransportConfig<CONF extends TransportConfig>
java.lang.Object
reactor.netty.transport.TransportConfig
reactor.netty.transport.ClientTransportConfig<CONF>
- Type Parameters:
CONF
- Configuration implementation
- Direct Known Subclasses:
HttpClientConfig
,TcpClientConfig
,UdpClientConfig
Encapsulate all necessary configuration for client transport. The public API is read-only.
- Since:
- 1.0.0
- Author:
- Stephane Maldini, Violeta Georgieva
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ClientTransportConfig
(ConnectionProvider connectionProvider, Map<ChannelOption<?>, ?> options, Supplier<? extends SocketAddress> remoteAddress) protected
-
Method Summary
Modifier and TypeMethodDescriptionint
channelType
(boolean isDomainSocket) Return the channel type this configuration is associated with, it can be one of the following.Return theConnectionProvider
.protected abstract AddressResolverGroup<?>
Provides a globalAddressResolverGroup
that is shared amongst all clients.protected ConnectionObserver
Return the configured defaultConnectionObserver
.protected ChannelPipelineConfigurer
Return the default callback if any orChannelPipelineConfigurer.emptyConfigurer()
.Return the configured callback or null.final @Nullable Consumer<? super Connection>
Return the configured callback or null.final @Nullable Consumer<? super Connection>
Return the configured callback or null.protected EventLoopGroup
Return the configuredEventLoopGroup
.@Nullable NameResolverProvider
Return the configuredNameResolverProvider
or null.final boolean
hasProxy()
Return true if thatClientTransportConfig
is configured with a proxy.final @Nullable ProxyProvider
Return theProxyProvider
if any or null.protected void
proxyProvider
(ProxyProvider proxyProvider) final @Nullable Supplier<ProxyProvider>
Return theProxyProvider
supplier if any or null.protected void
proxyProviderSupplier
(Supplier<ProxyProvider> proxyProviderSupplier) final Supplier<? extends SocketAddress>
Return the remote configuredSocketAddress
.final @Nullable AddressResolverGroup<?>
resolver()
Return the configuredAddressResolverGroup
or null.protected AddressResolverGroup<?>
Methods inherited from class reactor.netty.transport.TransportConfig
attributes, bindAddress, bindAddress, channelGroup, channelInitializer, channelOperationsProvider, connectionFactory, connectionObserver, defaultLoggingHandler, defaultLoopResources, defaultMetricsRecorder, doOnChannelInit, isPreferNative, loggingHandler, loggingHandler, loopResources, metricsRecorder, metricsRecorder, metricsRecorderInternal, options, updateMap
-
Constructor Details
-
ClientTransportConfig
protected ClientTransportConfig(ConnectionProvider connectionProvider, Map<ChannelOption<?>, ?> options, Supplier<? extends SocketAddress> remoteAddress) -
ClientTransportConfig
-
-
Method Details
-
channelHash
public int channelHash()- Overrides:
channelHash
in classTransportConfig
-
connectionProvider
Return theConnectionProvider
.- Returns:
- the
ConnectionProvider
-
doOnConnect
Return the configured callback or null.- Returns:
- the configured callback or null
-
doOnConnected
Return the configured callback or null.- Returns:
- the configured callback or null
-
doOnDisconnected
Return the configured callback or null.- Returns:
- the configured callback or null
-
hasProxy
public final boolean hasProxy()Return true if thatClientTransportConfig
is configured with a proxy.- Returns:
- true if that
ClientTransportConfig
is configured with a proxy
-
getNameResolverProvider
Return the configuredNameResolverProvider
or null.- Returns:
- the configured
NameResolverProvider
or null
-
proxyProvider
Return theProxyProvider
if any or null.- Returns:
- the
ProxyProvider
if any or null
-
proxyProviderSupplier
Return theProxyProvider
supplier if any or null.- Returns:
- the
ProxyProvider
supplier if any or null
-
remoteAddress
Return the remote configuredSocketAddress
.- Returns:
- the remote configured
SocketAddress
-
resolver
Return the configuredAddressResolverGroup
or null. If there is noAddressResolverGroup
configured, the default will be used.- Returns:
- the configured
AddressResolverGroup
or null
-
channelType
Description copied from class:TransportConfig
Return the channel type this configuration is associated with, it can be one of the following.- Specified by:
channelType
in classTransportConfig
- Parameters:
isDomainSocket
- true ifDomainSocketChannel
orServerDomainSocketChannel
is needed, false otherwise- Returns:
- the channel type this configuration is associated with
-
defaultAddressResolverGroup
Provides a globalAddressResolverGroup
that is shared amongst all clients.- Returns:
- the global
AddressResolverGroup
-
defaultConnectionObserver
Description copied from class:TransportConfig
Return the configured defaultConnectionObserver
.- Specified by:
defaultConnectionObserver
in classTransportConfig
- Returns:
- the configured default
ConnectionObserver
-
defaultOnChannelInit
Description copied from class:TransportConfig
Return the default callback if any orChannelPipelineConfigurer.emptyConfigurer()
.- Specified by:
defaultOnChannelInit
in classTransportConfig
- Returns:
- the default callback if any or
ChannelPipelineConfigurer.emptyConfigurer()
-
eventLoopGroup
Description copied from class:TransportConfig
Return the configuredEventLoopGroup
.- Specified by:
eventLoopGroup
in classTransportConfig
- Returns:
- the configured
EventLoopGroup
-
proxyProvider
-
proxyProviderSupplier
-
resolverInternal
-