public abstract class TransportConfig extends Object
| Modifier | Constructor and Description | 
|---|---|
| protected  | TransportConfig(Map<ChannelOption<?>,?> options)Default TransportConfig with options. | 
| protected  | TransportConfig(Map<ChannelOption<?>,?> options,
               Supplier<? extends SocketAddress> bindAddress)Default TransportConfig with options. | 
| protected  | TransportConfig(TransportConfig parent)Create TransportConfig from an existing one. | 
| Modifier and Type | Method and Description | 
|---|---|
| Map<AttributeKey<?>,?> | attributes()Return the read-only default channel attributes. | 
| Supplier<? extends SocketAddress> | bindAddress()Return the local  SocketAddresssupplier that will be bound or null. | 
| ChannelGroup | channelGroup()Return the configured  ChannelGroupor null. | 
| int | channelHash() | 
| ChannelInitializer<Channel> | channelInitializer(ConnectionObserver connectionObserver,
                  SocketAddress remoteAddress,
                  boolean onServer)Return the  ChannelInitializerthat will be used for initializing the channel pipeline. | 
| ChannelOperations.OnSetup | channelOperationsProvider()Return the associated  ChannelOperations.OnSetup, config implementations might override this. | 
| protected abstract Class<? extends Channel> | channelType(boolean isDomainSocket)Return the channel type this configuration is associated with, it can be one of the following. | 
| protected ChannelFactory<? extends Channel> | connectionFactory(EventLoopGroup elg,
                 boolean isDomainSocket)Return the  ChannelFactorywhich is used to createChannelinstances. | 
| ConnectionObserver | connectionObserver()Return the configured  ConnectionObserverif any orConnectionObserver.emptyListener(). | 
| protected abstract ConnectionObserver | defaultConnectionObserver()Return the configured default  ConnectionObserver. | 
| protected abstract LoggingHandler | defaultLoggingHandler()Return the default  LoggingHandlerto wiretap this transport. | 
| protected abstract LoopResources | defaultLoopResources()Return the default  LoopResourcesfor this transport. | 
| protected abstract ChannelMetricsRecorder | defaultMetricsRecorder()Return the configured metrics recorder. | 
| protected abstract ChannelPipelineConfigurer | defaultOnChannelInit()Return the default callback if any or  ChannelPipelineConfigurer.emptyConfigurer(). | 
| ChannelPipelineConfigurer | doOnChannelInit()Return the configured callback if any or  ChannelPipelineConfigurer.emptyConfigurer(). | 
| protected abstract EventLoopGroup | eventLoopGroup()Return the configured  EventLoopGroup. | 
| boolean | isPreferNative()Return  trueif prefer native event loop and channel factory (e.g. | 
| LoggingHandler | loggingHandler()Return the configured  LoggingHandleror null. | 
| protected void | loggingHandler(LoggingHandler loggingHandler) | 
| LoopResources | loopResources()Return the configured  LoopResourcesor the default. | 
| Supplier<? extends ChannelMetricsRecorder> | metricsRecorder()Return the configured metrics recorder  ChannelMetricsRecorderor null. | 
| protected void | metricsRecorder(Supplier<? extends ChannelMetricsRecorder> metricsRecorderSupplier)Obtains immediately the  ChannelMetricsRecorderfrom the providedSupplier. | 
| protected ChannelMetricsRecorder | metricsRecorderInternal() | 
| Map<ChannelOption<?>,?> | options()Return the read-only  ChannelOptionmap. | 
| protected static <K,V> Map<K,V> | updateMap(Map<K,V> parentMap,
         Object key,
         Object value)Add or remove values to a map in an immutable way by returning a new map instance. | 
protected TransportConfig(Map<ChannelOption<?>,?> options)
protected TransportConfig(Map<ChannelOption<?>,?> options, Supplier<? extends SocketAddress> bindAddress)
protected TransportConfig(TransportConfig parent)
public final Map<AttributeKey<?>,?> attributes()
@Nullable public final Supplier<? extends SocketAddress> bindAddress()
SocketAddress supplier that will be bound or null.SocketAddress supplierpublic int channelHash()
@Nullable public final ChannelGroup channelGroup()
ChannelGroup or null.ChannelGroup or nullpublic final ChannelInitializer<Channel> channelInitializer(ConnectionObserver connectionObserver, @Nullable SocketAddress remoteAddress, boolean onServer)
ChannelInitializer that will be used for initializing the channel pipeline.connectionObserver - the configured ConnectionObserverremoteAddress - the remote addressonServer - channel initializer for the server or for the clientChannelInitializer that will be used for initializing the channel pipelinepublic ChannelOperations.OnSetup channelOperationsProvider()
ChannelOperations.OnSetup, config implementations might override this.ChannelOperations.OnSetuppublic final ConnectionObserver connectionObserver()
ConnectionObserver if any or ConnectionObserver.emptyListener().ConnectionObserver if any or ConnectionObserver.emptyListener()public final ChannelPipelineConfigurer doOnChannelInit()
ChannelPipelineConfigurer.emptyConfigurer().ChannelPipelineConfigurer.emptyConfigurer()public final boolean isPreferNative()
true if prefer native event loop and channel factory (e.g. epoll or kqueue).true if prefer native event loop and channel factory (e.g. epoll or kqueue)@Nullable public final LoggingHandler loggingHandler()
LoggingHandler or null.LoggingHandler or nullpublic final LoopResources loopResources()
LoopResources or the default.LoopResources or the default@Nullable public final Supplier<? extends ChannelMetricsRecorder> metricsRecorder()
ChannelMetricsRecorder or null.ChannelMetricsRecorder or nullpublic final Map<ChannelOption<?>,?> options()
ChannelOption map.ChannelOption mapprotected abstract Class<? extends Channel> channelType(boolean isDomainSocket)
isDomainSocket - true if DomainSocketChannel or
 ServerDomainSocketChannel is needed, false otherwiseprotected ChannelFactory<? extends Channel> connectionFactory(EventLoopGroup elg, boolean isDomainSocket)
ChannelFactory which is used to create Channel instances.elg - the EventLoopGroupisDomainSocket - true if DomainSocketChannel or
 ServerDomainSocketChannel is needed, false otherwiseChannelFactory which is used to create Channel instances.protected abstract ConnectionObserver defaultConnectionObserver()
ConnectionObserver.ConnectionObserverprotected abstract LoggingHandler defaultLoggingHandler()
LoggingHandler to wiretap this transport.LoggingHandler to wiretap this transportprotected abstract LoopResources defaultLoopResources()
LoopResources for this transport.LoopResources for this transportprotected abstract ChannelMetricsRecorder defaultMetricsRecorder()
protected abstract ChannelPipelineConfigurer defaultOnChannelInit()
ChannelPipelineConfigurer.emptyConfigurer().ChannelPipelineConfigurer.emptyConfigurer()protected abstract EventLoopGroup eventLoopGroup()
EventLoopGroup.EventLoopGroupprotected void loggingHandler(LoggingHandler loggingHandler)
protected void metricsRecorder(@Nullable Supplier<? extends ChannelMetricsRecorder> metricsRecorderSupplier)
ChannelMetricsRecorder from the provided Supplier.metricsRecorderSupplier - a supplier for the ChannelMetricsRecorderprotected ChannelMetricsRecorder metricsRecorderInternal()
protected static <K,V> Map<K,V> updateMap(Map<K,V> parentMap, Object key, @Nullable Object value)
K - key type to addV - value to addparentMap - the container map to updatekey - the key to updatevalue - the new value or null to remove an existing key