CONF
- Configuration implementationpublic abstract class ClientTransportConfig<CONF extends TransportConfig> extends TransportConfig
Modifier | Constructor and Description |
---|---|
protected |
ClientTransportConfig(ClientTransportConfig<CONF> parent) |
protected |
ClientTransportConfig(ConnectionProvider connectionProvider,
Map<ChannelOption<?>,?> options,
Supplier<? extends SocketAddress> remoteAddress) |
Modifier and Type | Method and Description |
---|---|
int |
channelHash() |
protected Class<? extends Channel> |
channelType(boolean isDomainSocket)
Return the channel type this configuration is associated with, it can be one of the following.
|
ConnectionProvider |
connectionProvider()
Return the
ConnectionProvider . |
protected abstract AddressResolverGroup<?> |
defaultAddressResolverGroup()
Provides a global
AddressResolverGroup that is shared amongst all clients. |
protected ConnectionObserver |
defaultConnectionObserver()
Return the configured default
ConnectionObserver . |
protected ChannelPipelineConfigurer |
defaultOnChannelInit()
Return the default callback if any or
ChannelPipelineConfigurer.emptyConfigurer() . |
Consumer<? super CONF> |
doOnConnect()
Return the configured callback or null.
|
Consumer<? super Connection> |
doOnConnected()
Return the configured callback or null.
|
Consumer<? super Connection> |
doOnDisconnected()
Return the configured callback or null.
|
protected EventLoopGroup |
eventLoopGroup()
Return the configured
EventLoopGroup . |
NameResolverProvider |
getNameResolverProvider()
Return the configured
NameResolverProvider or null. |
boolean |
hasProxy()
Return true if that
ClientTransportConfig is configured with a proxy. |
ProxyProvider |
proxyProvider()
Return the
ProxyProvider if any or null. |
protected void |
proxyProvider(ProxyProvider proxyProvider) |
Supplier<? extends SocketAddress> |
remoteAddress()
Return the remote configured
SocketAddress . |
AddressResolverGroup<?> |
resolver()
Return the configured
AddressResolverGroup or null. |
protected AddressResolverGroup<?> |
resolverInternal() |
attributes, bindAddress, bindAddress, channelGroup, channelInitializer, channelOperationsProvider, connectionFactory, connectionObserver, defaultLoggingHandler, defaultLoopResources, defaultMetricsRecorder, doOnChannelInit, isPreferNative, loggingHandler, loggingHandler, loopResources, metricsRecorder, metricsRecorder, metricsRecorderInternal, options, updateMap
protected ClientTransportConfig(ConnectionProvider connectionProvider, Map<ChannelOption<?>,?> options, Supplier<? extends SocketAddress> remoteAddress)
protected ClientTransportConfig(ClientTransportConfig<CONF> parent)
public int channelHash()
channelHash
in class TransportConfig
public ConnectionProvider connectionProvider()
ConnectionProvider
.ConnectionProvider
@Nullable public final Consumer<? super CONF> doOnConnect()
@Nullable public final Consumer<? super Connection> doOnConnected()
@Nullable public final Consumer<? super Connection> doOnDisconnected()
public final boolean hasProxy()
ClientTransportConfig
is configured with a proxy.ClientTransportConfig
is configured with a proxy@Nullable public NameResolverProvider getNameResolverProvider()
NameResolverProvider
or null.NameResolverProvider
or null@Nullable public final ProxyProvider proxyProvider()
ProxyProvider
if any or null.ProxyProvider
if any or nullpublic final Supplier<? extends SocketAddress> remoteAddress()
SocketAddress
.SocketAddress
@Nullable public final AddressResolverGroup<?> resolver()
AddressResolverGroup
or null.
If there is no AddressResolverGroup
configured, the default will be used.AddressResolverGroup
or nullprotected Class<? extends Channel> channelType(boolean isDomainSocket)
TransportConfig
channelType
in class TransportConfig
isDomainSocket
- true if DomainSocketChannel
or
ServerDomainSocketChannel
is needed, false otherwiseprotected abstract AddressResolverGroup<?> defaultAddressResolverGroup()
AddressResolverGroup
that is shared amongst all clients.AddressResolverGroup
protected ConnectionObserver defaultConnectionObserver()
TransportConfig
ConnectionObserver
.defaultConnectionObserver
in class TransportConfig
ConnectionObserver
protected ChannelPipelineConfigurer defaultOnChannelInit()
TransportConfig
ChannelPipelineConfigurer.emptyConfigurer()
.defaultOnChannelInit
in class TransportConfig
ChannelPipelineConfigurer.emptyConfigurer()
protected EventLoopGroup eventLoopGroup()
TransportConfig
EventLoopGroup
.eventLoopGroup
in class TransportConfig
EventLoopGroup
protected void proxyProvider(@Nullable ProxyProvider proxyProvider)
protected AddressResolverGroup<?> resolverInternal()