Top Description Inners Fields Constructors Methods
reactor.netty.transport

public abstract Class ServerTransportConfig<CONF extends reactor.netty.transport.TransportConfig>

extends TransportConfig
Class Inheritance
Known Direct Subclasses
reactor.netty.tcp.TcpServerConfig
Type Parameters
<CONF>
Configuration implementation
Imports
java.net.SocketAddress, java.util.Collections, .Map, .Objects, java.util.function.Consumer, .Supplier, io.netty.channel.Channel, .ChannelOption, .EventLoopGroup, io.netty.channel.group.ChannelGroup, io.netty.channel.socket.ServerSocketChannel, io.netty.channel.unix.ServerDomainSocketChannel, io.netty.util.AttributeKey, reactor.netty.ChannelPipelineConfigurer, .Connection, .ConnectionObserver, .DisposableServer, reactor.util.annotation.Nullable

Encapsulate all necessary configuration for server transport. The public API is read-only.
Authors
Stephane Maldini, Violeta Georgieva
Since
1.0.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv Map<AttributeKey<?>, ?>
pack-priv ConnectionObserver
pack-priv Map<ChannelOption<?>, ?>
pack-priv Consumer<? super CONF>
pack-priv Consumer<? super DisposableServer>
pack-priv Consumer<? super Connection>
pack-priv Consumer<? super DisposableServer>
Inherited from reactor.netty.transport.TransportConfig:
attrsbindAddresschannelGroupdoOnChannelInitlogloggingHandlerloopResourcesmetricsRecorderobserveroptionspreferNative

Constructor Summary

AccessConstructor and Description
protected
ServerTransportConfig(Map<ChannelOption<?>, ?>
default options for the selector
options
,
Map<ChannelOption<?>, ?>
default options for each connected channel
childOptions
,
Supplier<? extends SocketAddress>
the local address
bindAddress
)

Default ServerTransportConfig with options.

protected

Method Summary

Modifier and TypeMethod and Description
protected Class<? extends Channel>
channelType(boolean isDomainSocket)

Implements abstract reactor.netty.transport.TransportConfig.channelType.

Return the channel type this configuration is associated with, it can be one of the following.
public final Map<AttributeKey<?>, ?>

Returns:

the read-only default channel attributes for each remote connection
childAttributes
()

Return the read-only default channel attributes for each remote connection.

pack-priv final EventLoopGroup

Returns:

the configured EventLoopGroup used for the remote connection.
childEventLoopGroup
()

Return the configured EventLoopGroup used for the remote connection.

public final ConnectionObserver

Returns:

the configured ConnectionObserver if any or ConnectionObserver#emptyListener() for each remote connection
childObserver
()

Return the configured ConnectionObserver if any or ConnectionObserver#emptyListener() for each remote connection.

public final Map<ChannelOption<?>, ?>

Returns:

the read-only ChannelOption map for each remote connection
childOptions
()

Return the read-only ChannelOption map for each remote connection.

protected ConnectionObserver

Returns:

the configured child lifecycle ConnectionObserver if any or ConnectionObserver#emptyListener()
defaultChildObserver
()

Return the configured child lifecycle ConnectionObserver if any or ConnectionObserver#emptyListener().

protected ConnectionObserver
protected ChannelPipelineConfigurer
public final Consumer<? super CONF>

Returns:

the configured callback or null
doOnBind
()

Return the configured callback or null.

public final Consumer<? super DisposableServer>

Returns:

the configured callback or null
doOnBound
()

Return the configured callback or null.

public final Consumer<? super Connection>

Returns:

the configured callback or null
doOnConnection
()

Return the configured callback or null.

public final Consumer<? super DisposableServer>

Returns:

the configured callback or null
doOnUnbound
()

Return the configured callback or null.

protected final EventLoopGroup
Inherited from reactor.netty.transport.TransportConfig:
attributesbindAddresschannelGroupchannelHashchannelInitializerchannelOperationsProviderconnectionFactoryconnectionObserverdefaultLoggingHandlerdefaultLoopResourcesdefaultMetricsRecorderdoOnChannelInitisPreferNativeloggingHandlerloggingHandlerloopResourcesmetricsRecordermetricsRecordermetricsRecorderInternaloptionsupdateMap

Field Detail

childAttrsback to summary
pack-priv Map<AttributeKey<?>, ?> childAttrs
childObserverback to summary
pack-priv ConnectionObserver childObserver
childOptionsback to summary
pack-priv Map<ChannelOption<?>, ?> childOptions
doOnBindback to summary
pack-priv Consumer<? super CONF> doOnBind
doOnBoundback to summary
pack-priv Consumer<? super DisposableServer> doOnBound
doOnConnectionback to summary
pack-priv Consumer<? super Connection> doOnConnection
doOnUnboundback to summary
pack-priv Consumer<? super DisposableServer> doOnUnbound

Constructor Detail

ServerTransportConfigback to summary
protected ServerTransportConfig(Map<ChannelOption<?>, ?> options, Map<ChannelOption<?>, ?> childOptions, Supplier<? extends SocketAddress> bindAddress)

Default ServerTransportConfig with options.

Parameters
options:Map<ChannelOption<?>, ?>

default options for the selector

childOptions:Map<ChannelOption<?>, ?>

default options for each connected channel

bindAddress:Supplier<? extends SocketAddress>

the local address

ServerTransportConfigback to summary
protected ServerTransportConfig(ServerTransportConfig<CONF> parent)

Method Detail

channelTypeback to summary
protected Class<? extends Channel> channelType(boolean isDomainSocket)

Implements abstract reactor.netty.transport.TransportConfig.channelType.

Doc from reactor.netty.transport.TransportConfig.channelType.

Return the channel type this configuration is associated with, it can be one of the following.

Parameters
isDomainSocket:boolean

true if io.netty.channel.unix.DomainSocketChannel or io.netty.channel.unix.ServerDomainSocketChannel is needed, false otherwise

Returns:Class<? extends Channel>

the channel type this configuration is associated with

Annotations
@Override
childAttributesback to summary
public final Map<AttributeKey<?>, ?> childAttributes()

Return the read-only default channel attributes for each remote connection.

Returns:Map<AttributeKey<?>, ?>

the read-only default channel attributes for each remote connection

childEventLoopGroupback to summary
pack-priv final EventLoopGroup childEventLoopGroup()

Return the configured EventLoopGroup used for the remote connection.

Returns:EventLoopGroup

the configured EventLoopGroup used for the remote connection.

childObserverback to summary
public final ConnectionObserver childObserver()

Return the configured ConnectionObserver if any or ConnectionObserver#emptyListener() for each remote connection.

Returns:ConnectionObserver

the configured ConnectionObserver if any or ConnectionObserver#emptyListener() for each remote connection

childOptionsback to summary
public final Map<ChannelOption<?>, ?> childOptions()

Return the read-only ChannelOption map for each remote connection.

Returns:Map<ChannelOption<?>, ?>

the read-only ChannelOption map for each remote connection

defaultChildObserverback to summary
protected ConnectionObserver defaultChildObserver()

Return the configured child lifecycle ConnectionObserver if any or ConnectionObserver#emptyListener().

Returns:ConnectionObserver

the configured child lifecycle ConnectionObserver if any or ConnectionObserver#emptyListener()

defaultConnectionObserverback to summary
protected ConnectionObserver defaultConnectionObserver()

Implements abstract reactor.netty.transport.TransportConfig.defaultConnectionObserver.

Doc from reactor.netty.transport.TransportConfig.defaultConnectionObserver.

Return the configured default ConnectionObserver.

Returns:ConnectionObserver

the configured default ConnectionObserver

Annotations
@Override
defaultOnChannelInitback to summary
protected ChannelPipelineConfigurer defaultOnChannelInit()

Implements abstract reactor.netty.transport.TransportConfig.defaultOnChannelInit.

Doc from reactor.netty.transport.TransportConfig.defaultOnChannelInit.

Return the default callback if any or ChannelPipelineConfigurer#emptyConfigurer().

Returns:ChannelPipelineConfigurer

the default callback if any or ChannelPipelineConfigurer#emptyConfigurer()

Annotations
@Override
doOnBindback to summary
public final Consumer<? super CONF> doOnBind()

Return the configured callback or null.

Returns:Consumer<? super CONF>

the configured callback or null

Annotations
@Nullable
doOnBoundback to summary
public final Consumer<? super DisposableServer> doOnBound()

Return the configured callback or null.

Returns:Consumer<? super DisposableServer>

the configured callback or null

Annotations
@Nullable
doOnConnectionback to summary
public final Consumer<? super Connection> doOnConnection()

Return the configured callback or null.

Returns:Consumer<? super Connection>

the configured callback or null

Annotations
@Nullable
doOnUnboundback to summary
public final Consumer<? super DisposableServer> doOnUnbound()

Return the configured callback or null.

Returns:Consumer<? super DisposableServer>

the configured callback or null

Annotations
@Nullable
eventLoopGroupback to summary
protected final EventLoopGroup eventLoopGroup()

Implements abstract reactor.netty.transport.TransportConfig.eventLoopGroup.

Doc from reactor.netty.transport.TransportConfig.eventLoopGroup.

Return the configured EventLoopGroup.

Returns:EventLoopGroup

the configured EventLoopGroup

Annotations
@Override
reactor.netty.transport back to summary

pack-priv final Class ServerTransportConfig.ServerTransportDoOn

extends Object
implements ConnectionObserver
Class Inheritance
  • java.lang.Object
  • reactor.netty.transport.ServerTransportConfig.ServerTransportDoOn
All Implemented Interfaces
reactor.netty.ConnectionObserver

Field Summary

Modifier and TypeField and Description
pack-priv final Consumer<? super DisposableServer>
pack-priv final Consumer<? super DisposableServer>

Constructor Summary

AccessConstructor and Description
pack-priv
ServerTransportDoOn(Consumer<? super DisposableServer> doOnBound, Consumer<? super DisposableServer> doOnUnbound)

Method Summary

Modifier and TypeMethod and Description
public void
onStateChange(Connection
the connection reference
connection
,
ConnectionObserver.State
the new State
newState
)

Implements reactor.netty.ConnectionObserver.onStateChange.

React on connection state change (e.g. http request or response).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

doOnBoundback to summary
pack-priv final Consumer<? super DisposableServer> doOnBound
doOnUnboundback to summary
pack-priv final Consumer<? super DisposableServer> doOnUnbound

Constructor Detail

ServerTransportDoOnback to summary
pack-priv ServerTransportDoOn(Consumer<? super DisposableServer> doOnBound, Consumer<? super DisposableServer> doOnUnbound)

Method Detail

onStateChangeback to summary
public void onStateChange(Connection connection, ConnectionObserver.State newState)

Implements reactor.netty.ConnectionObserver.onStateChange.

Doc from reactor.netty.ConnectionObserver.onStateChange.

React on connection state change (e.g. http request or response).

Parameters
connection:Connection

the connection reference

newState:ConnectionObserver.State

the new State

Annotations
@Override
reactor.netty.transport back to summary

pack-priv final Class ServerTransportConfig.ServerTransportDoOnConnection

extends Object
implements ConnectionObserver
Class Inheritance
  • java.lang.Object
  • reactor.netty.transport.ServerTransportConfig.ServerTransportDoOnConnection
All Implemented Interfaces
reactor.netty.ConnectionObserver

Field Summary

Modifier and TypeField and Description
pack-priv final ChannelGroup
pack-priv final Consumer<? super Connection>

Constructor Summary

AccessConstructor and Description
pack-priv
ServerTransportDoOnConnection(ChannelGroup channelGroup, Consumer<? super Connection> doOnConnection)

Method Summary

Modifier and TypeMethod and Description
public void
onStateChange(Connection
the connection reference
connection
,
ConnectionObserver.State
the new State
newState
)

Implements reactor.netty.ConnectionObserver.onStateChange.

React on connection state change (e.g. http request or response).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

channelGroupback to summary
pack-priv final ChannelGroup channelGroup
doOnConnectionback to summary
pack-priv final Consumer<? super Connection> doOnConnection

Constructor Detail

ServerTransportDoOnConnectionback to summary
pack-priv ServerTransportDoOnConnection(ChannelGroup channelGroup, Consumer<? super Connection> doOnConnection)

Method Detail

onStateChangeback to summary
public void onStateChange(Connection connection, ConnectionObserver.State newState)

Implements reactor.netty.ConnectionObserver.onStateChange.

Doc from reactor.netty.ConnectionObserver.onStateChange.

React on connection state change (e.g. http request or response).

Parameters
connection:Connection

the connection reference

newState:ConnectionObserver.State

the new State

Annotations
@Override
@SuppressWarnings:FutureReturnValueIgnored