Top Description Inners Fields Constructors Methods
reactor.netty.udp

public final Class UdpServerConfig

extends TransportConfig
Class Inheritance
Imports
io.netty.channel.Channel, .ChannelFactory, .ChannelOption, .EventLoopGroup, io.netty.channel.group.ChannelGroup, io.netty.channel.socket.DatagramChannel, .InternetProtocolFamily, io.netty.channel.socket.nio.NioDatagramChannel, io.netty.channel.unix.DomainDatagramChannel, io.netty.handler.logging.LogLevel, .LoggingHandler, reactor.netty.ChannelPipelineConfigurer, .Connection, .ConnectionObserver, reactor.netty.channel.ChannelMetricsRecorder, .ChannelOperations, .MicrometerChannelMetricsRecorder, reactor.netty.resources.LoopResources, reactor.netty.transport.TransportConfig, reactor.netty.transport.logging.AdvancedByteBufFormat, reactor.util.annotation.Nullable, java.net.SocketAddress, java.nio.charset.Charset, java.util.Map, java.util.function.Consumer, .Supplier

Encapsulate all necessary configuration for UDP server transport. The public API is read-only.
Author
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 static final ChannelOperations.OnSetup
pack-priv Consumer<? super UdpServerConfig>
pack-priv Consumer<? super Connection>
pack-priv Consumer<? super Connection>
pack-priv InternetProtocolFamily
pack-priv static final LoggingHandler

Constructor Summary

AccessConstructor and Description
pack-priv
UdpServerConfig(Map<ChannelOption<?>, ?> options, Supplier<? extends SocketAddress> bindAddress)

pack-priv

Method Summary

Modifier and TypeMethod and Description
public ChannelOperations.OnSetup
channelOperationsProvider()

Overrides reactor.netty.transport.TransportConfig.channelOperationsProvider.

Return the associated ChannelOperations.OnSetup, config implementations might override this.
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.
protected ChannelFactory<? extends Channel>
connectionFactory(EventLoopGroup elg, boolean isDomainSocket)

Overrides reactor.netty.transport.TransportConfig.connectionFactory.

Deprecated as a consequence of ChannelFactory being deprecated.
Return the ChannelFactory which is used to create Channel instances.
protected ConnectionObserver
protected LoggingHandler
defaultLoggingHandler()

Implements abstract reactor.netty.transport.TransportConfig.defaultLoggingHandler.

Return the default LoggingHandler to wiretap this transport.
protected LoopResources
defaultLoopResources()

Implements abstract reactor.netty.transport.TransportConfig.defaultLoopResources.

Return the default LoopResources for this transport.
protected ChannelMetricsRecorder
defaultMetricsRecorder()

Implements abstract reactor.netty.transport.TransportConfig.defaultMetricsRecorder.

Return the configured metrics recorder.
protected ChannelPipelineConfigurer
public final Consumer<? super UdpServerConfig>

Returns:

the configured callback or null
doOnBind
()

Return the configured callback or null.

public final Consumer<? super Connection>

Returns:

the configured callback or null
doOnBound
()

Return the configured callback or null.

public final Consumer<? super Connection>

Returns:

the configured callback or null
doOnUnbound
()

Return the configured callback or null.

protected EventLoopGroup
public final InternetProtocolFamily

Returns:

the configured InternetProtocolFamily to run with or null
family
()

Return the configured InternetProtocolFamily to run with or null.

Inherited from reactor.netty.transport.TransportConfig:
attributesbindAddresschannelGroupchannelHashchannelInitializerconnectionObserverdoOnChannelInitisPreferNativeloggingHandlerloggingHandlerloopResourcesmetricsRecordermetricsRecordermetricsRecorderInternaloptionsupdateMap

Field Detail

DEFAULT_OPSback to summary
pack-priv static final ChannelOperations.OnSetup DEFAULT_OPS
doOnBindback to summary
pack-priv Consumer<? super UdpServerConfig> doOnBind
doOnBoundback to summary
pack-priv Consumer<? super Connection> doOnBound
doOnUnboundback to summary
pack-priv Consumer<? super Connection> doOnUnbound
familyback to summary
pack-priv InternetProtocolFamily family
LOGGING_HANDLERback to summary
pack-priv static final LoggingHandler LOGGING_HANDLER

Constructor Detail

UdpServerConfigback to summary
pack-priv UdpServerConfig(Map<ChannelOption<?>, ?> options, Supplier<? extends SocketAddress> bindAddress)
UdpServerConfigback to summary
pack-priv UdpServerConfig(UdpServerConfig parent)

Method Detail

channelOperationsProviderback to summary
public ChannelOperations.OnSetup channelOperationsProvider()

Overrides reactor.netty.transport.TransportConfig.channelOperationsProvider.

Doc from reactor.netty.transport.TransportConfig.channelOperationsProvider.

Return the associated ChannelOperations.OnSetup, config implementations might override this.

Returns:ChannelOperations.OnSetup

the associated ChannelOperations.OnSetup

Annotations
@Override
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
connectionFactoryback to summary
protected ChannelFactory<? extends Channel> connectionFactory(EventLoopGroup elg, boolean isDomainSocket)

Overrides reactor.netty.transport.TransportConfig.connectionFactory.

Doc from reactor.netty.transport.TransportConfig.connectionFactory.

Deprecated

as a consequence of ChannelFactory being deprecated. See corresponding docs for further information.

Return the ChannelFactory which is used to create Channel instances.

Parameters
elg:EventLoopGroup

the EventLoopGroup

isDomainSocket:boolean

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

Returns:ChannelFactory<? extends Channel>

the ChannelFactory which is used to create Channel instances.

Annotations
@Override
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
defaultLoggingHandlerback to summary
protected LoggingHandler defaultLoggingHandler()

Implements abstract reactor.netty.transport.TransportConfig.defaultLoggingHandler.

Doc from reactor.netty.transport.TransportConfig.defaultLoggingHandler.

Return the default LoggingHandler to wiretap this transport.

Returns:LoggingHandler

the default LoggingHandler to wiretap this transport

Annotations
@Override
defaultLoopResourcesback to summary
protected LoopResources defaultLoopResources()

Implements abstract reactor.netty.transport.TransportConfig.defaultLoopResources.

Doc from reactor.netty.transport.TransportConfig.defaultLoopResources.

Return the default LoopResources for this transport.

Returns:LoopResources

the default LoopResources for this transport

Annotations
@Override
defaultMetricsRecorderback to summary
protected ChannelMetricsRecorder defaultMetricsRecorder()

Implements abstract reactor.netty.transport.TransportConfig.defaultMetricsRecorder.

Doc from reactor.netty.transport.TransportConfig.defaultMetricsRecorder.

Return the configured metrics recorder.

Returns:ChannelMetricsRecorder

the configured metrics recorder

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 UdpServerConfig> doOnBind()

Return the configured callback or null.

Returns:Consumer<? super UdpServerConfig>

the configured callback or null

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

Return the configured callback or null.

Returns:Consumer<? super Connection>

the configured callback or null

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

Return the configured callback or null.

Returns:Consumer<? super Connection>

the configured callback or null

Annotations
@Nullable
eventLoopGroupback to summary
protected 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
familyback to summary
public final InternetProtocolFamily family()

Return the configured InternetProtocolFamily to run with or null.

Returns:InternetProtocolFamily

the configured InternetProtocolFamily to run with or null

Annotations
@Nullable
reactor.netty.udp back to summary

pack-priv final Class UdpServerConfig.MicrometerUdpServerMetricsRecorder

extends MicrometerChannelMetricsRecorder
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv static final UdpServerConfig.MicrometerUdpServerMetricsRecorder

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from reactor.netty.channel.MicrometerChannelMetricsRecorder:
filtergetResolveAddressTimergetTlsHandshakeTimerincrementErrorsCountnameprotocolrecordConnectTimerecordDataReceivedrecordDataSentrecordResolveAddressTimerecordServerConnectionClosedrecordServerConnectionOpenedrecordTlsHandshakeTime

Field Detail

INSTANCEback to summary
pack-priv static final UdpServerConfig.MicrometerUdpServerMetricsRecorder INSTANCE

Constructor Detail

MicrometerUdpServerMetricsRecorderback to summary
pack-priv MicrometerUdpServerMetricsRecorder()
reactor.netty.udp back to summary

pack-priv final Class UdpServerConfig.UdpServerDoOn

extends Object
implements ConnectionObserver
Class Inheritance
All Implemented Interfaces
reactor.netty.ConnectionObserver

Field Summary

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

Constructor Summary

AccessConstructor and Description
pack-priv
UdpServerDoOn(ChannelGroup channelGroup, Consumer<? super Connection> doOnBound, Consumer<? super Connection> 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

channelGroupback to summary
pack-priv final ChannelGroup channelGroup
doOnBoundback to summary
pack-priv final Consumer<? super Connection> doOnBound
doOnUnboundback to summary
pack-priv final Consumer<? super Connection> doOnUnbound

Constructor Detail

UdpServerDoOnback to summary
pack-priv UdpServerDoOn(ChannelGroup channelGroup, Consumer<? super Connection> doOnBound, Consumer<? super Connection> 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