Package reactor.netty.transport
Class ServerTransportConfig<CONF extends TransportConfig>
java.lang.Object
reactor.netty.transport.TransportConfig
reactor.netty.transport.ServerTransportConfig<CONF>
- Type Parameters:
CONF
- Configuration implementation
- Direct Known Subclasses:
HttpServerConfig
,TcpServerConfig
Encapsulate all necessary configuration for server transport. The public API is read-only.
- Since:
- 1.0.0
- Author:
- Stephane Maldini, Violeta Georgieva
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ServerTransportConfig
(Map<ChannelOption<?>, ?> options, Map<ChannelOption<?>, ?> childOptions, Supplier<? extends SocketAddress> bindAddress) Default ServerTransportConfig with options.protected
-
Method Summary
Modifier and TypeMethodDescriptionchannelType
(boolean isDomainSocket) Return the channel type this configuration is associated with, it can be one of the following.final Map<AttributeKey<?>,
?> Return the read-only default channel attributes for each remote connection.final ConnectionObserver
Return the configuredConnectionObserver
if any orConnectionObserver.emptyListener()
for each remote connection.final Map<ChannelOption<?>,
?> Return the read-onlyChannelOption
map for each remote connection.protected ConnectionObserver
Return the configured child lifecycleConnectionObserver
if any orConnectionObserver.emptyListener()
.protected ConnectionObserver
Return the configured defaultConnectionObserver
.protected ChannelPipelineConfigurer
Return the default callback if any orChannelPipelineConfigurer.emptyConfigurer()
.doOnBind()
Return the configured callback or null.final @Nullable Consumer<? super DisposableServer>
Return the configured callback or null.final @Nullable Consumer<? super Connection>
Return the configured callback or null.final @Nullable Consumer<? super DisposableServer>
Return the configured callback or null.protected final EventLoopGroup
Return the configuredEventLoopGroup
.Methods inherited from class reactor.netty.transport.TransportConfig
attributes, bindAddress, bindAddress, channelGroup, channelHash, channelInitializer, channelOperationsProvider, connectionFactory, connectionObserver, defaultLoggingHandler, defaultLoopResources, defaultMetricsRecorder, doOnChannelInit, isPreferNative, loggingHandler, loggingHandler, loopResources, metricsRecorder, metricsRecorder, metricsRecorderInternal, options, updateMap
-
Constructor Details
-
ServerTransportConfig
protected ServerTransportConfig(Map<ChannelOption<?>, ?> options, Map<ChannelOption<?>, ?> childOptions, Supplier<? extends SocketAddress> bindAddress) Default ServerTransportConfig with options.- Parameters:
options
- default options for the selectorchildOptions
- default options for each connected channelbindAddress
- the local address
-
ServerTransportConfig
-
-
Method Details
-
childAttributes
Return the read-only default channel attributes for each remote connection.- Returns:
- the read-only default channel attributes for each remote connection
-
childObserver
Return the configuredConnectionObserver
if any orConnectionObserver.emptyListener()
for each remote connection.- Returns:
- the configured
ConnectionObserver
if any orConnectionObserver.emptyListener()
for each remote connection
-
childOptions
Return the read-onlyChannelOption
map for each remote connection.- Returns:
- the read-only
ChannelOption
map for each remote connection
-
doOnBind
Return the configured callback or null.- Returns:
- the configured callback or null
-
doOnBound
Return the configured callback or null.- Returns:
- the configured callback or null
-
doOnConnection
Return the configured callback or null.- Returns:
- the configured callback or null
-
doOnUnbound
Return the configured callback or null.- Returns:
- the configured callback 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
-
defaultChildObserver
Return the configured child lifecycleConnectionObserver
if any orConnectionObserver.emptyListener()
.- Returns:
- the configured child lifecycle
ConnectionObserver
if any orConnectionObserver.emptyListener()
-
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
-