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, raccoonback
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedServerTransportConfig(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 ConnectionObserverReturn the configuredConnectionObserverif any orConnectionObserver.emptyListener()for each remote connection.final Map<ChannelOption<?>,?> Return the read-onlyChannelOptionmap for each remote connection.protected ConnectionObserverReturn the configured child lifecycleConnectionObserverif any orConnectionObserver.emptyListener().protected ConnectionObserverReturn the configured defaultConnectionObserver.protected ChannelPipelineConfigurerReturn 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 EventLoopGroupReturn the configuredEventLoopGroup.final intReturn the configured maximum number of concurrent connections.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 configuredConnectionObserverif any orConnectionObserver.emptyListener()for each remote connection.- Returns:
- the configured
ConnectionObserverif any orConnectionObserver.emptyListener()for each remote connection
-
childOptions
Return the read-onlyChannelOptionmap for each remote connection.- Returns:
- the read-only
ChannelOptionmap 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
-
maxConnections
public final int maxConnections()Return the configured maximum number of concurrent connections.- Returns:
- the maximum number of concurrent connections, or -1 for no limit
-
channelType
Description copied from class:TransportConfigReturn the channel type this configuration is associated with, it can be one of the following.- Specified by:
channelTypein classTransportConfig- Parameters:
isDomainSocket- true ifDomainSocketChannelorServerDomainSocketChannelis needed, false otherwise- Returns:
- the channel type this configuration is associated with
-
defaultChildObserver
Return the configured child lifecycleConnectionObserverif any orConnectionObserver.emptyListener().- Returns:
- the configured child lifecycle
ConnectionObserverif any orConnectionObserver.emptyListener()
-
defaultConnectionObserver
Description copied from class:TransportConfigReturn the configured defaultConnectionObserver.- Specified by:
defaultConnectionObserverin classTransportConfig- Returns:
- the configured default
ConnectionObserver
-
defaultOnChannelInit
Description copied from class:TransportConfigReturn the default callback if any orChannelPipelineConfigurer.emptyConfigurer().- Specified by:
defaultOnChannelInitin classTransportConfig- Returns:
- the default callback if any or
ChannelPipelineConfigurer.emptyConfigurer()
-
eventLoopGroup
Description copied from class:TransportConfigReturn the configuredEventLoopGroup.- Specified by:
eventLoopGroupin classTransportConfig- Returns:
- the configured
EventLoopGroup
-