bind() is ultimately called.
Example:
UdpServer.create()
.doOnBind(startMetrics)
.doOnBound(startedMetrics)
.doOnUnbind(stopMetrics)
.host("127.0.0.1")
.port(1234)
.bind()
.block()
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final <A> UdpServer | attr(AttributeKey<A>
the key, A AttributeKey keythe value)AttributeKey valueOverrides reactor. |
| public abstract Mono | |
| public final UdpServer | bindAddress(Supplier<? extends SocketAddress>
A supplier of the address to bind to. bindAddressSupplier)
Set a new local address to which this transport should bind on subscribe.
|
| public final Connection | Returns: aConnectionStarts the server in a blocking fashion, and waits for it to finish initializing
or the startup timeout expires (the startup timeout is |
| public final Connection | Returns: aConnectionmax startup timeout (resolution: ns) timeout)Start the server in a blocking fashion, and wait for it to finish initializing or the provided startup timeout expires. |
| public static UdpServer | |
| public final UdpServer | Returns: a newUdpServer referencea consumer observing connected events doOnBind)Set or add a callback called when |
| public final UdpServer | Returns: a newUdpServer referencea consumer observing connected events doOnBound)Set or add a callback called after |
| public final UdpServer | Returns: a newUdpServer referencea consumer observing unbound events doOnUnbound)Set or add a callback called after |
| public final UdpServer | Returns: a newUdpServeran IO handler that can dispose underlying connection when handler)Publisher terminates.Attach an IO handler to react on connected client. |
| public final UdpServer | |
| public final UdpServer | metrics(boolean
true enables metrics collection; false disables it enable)Overrides reactor. globalRegistry.
|
| public final UdpServer | metrics(boolean
if true enables the metrics on the enable, Supplier<? extends ChannelMetricsRecorder> Transport.a supplier for the recorder)ChannelMetricsRecorderOverrides reactor. Transport.
|
| public final UdpServer | observe(ConnectionObserver
the observer)ConnectionObserver to be set or addOverrides reactor. ConnectionObserver to observe the connection state changes.
|
| public final <O> UdpServer | option(ChannelOption<O>
the key, O ChannelOption keythe value)ChannelOption value or nullOverrides reactor. |
| public final UdpServer | |
| public final UdpServer | runOn(EventLoopGroup
an eventLoopGroup to share eventLoopGroup)Overrides reactor. EventLoopGroup.
|
| public final UdpServer | runOn(LoopResources
a channelResources)LoopResources accepting native runtime expectation and
returning an eventLoopGroupOverrides reactor. EventLoopGroup from the LoopResources container.
|
| public final UdpServer | Returns: a newUdpServer referencea new loop resources loopResources, boolean should prefer running on epoll, kqueue or similar instead of java NIO preferNative)Overrides reactor. EventLoopGroup from the LoopResources container.
|
| public final UdpServer | Returns: a newUdpServer referencea new loop resources loopResources, InternetProtocolFamily a specific family)InternetProtocolFamily to run withRun IO loops on a supplied |
| public final Mono | |
| public final UdpServer | wiretap(boolean
specifies whether the wire logger configuration will be added to the pipeline enable)Overrides reactor. Transport category (logger),
DEBUG logger level and AdvancedByteBufFormat#HEX_DUMP for ByteBuf format,
which means both events and content will be logged and the content will be in hex format.
|
| public final UdpServer | wiretap(String
the logger category category)Overrides reactor. DEBUG logger level and AdvancedByteBufFormat#HEX_DUMP for ByteBuf format,
which means both events and content will be logged and the content will be in hex format.
|
| public final UdpServer | wiretap(String
the logger category category, LogLevel the logger level level)Overrides reactor. AdvancedByteBufFormat#HEX_DUMP for ByteBuf format,
which means both events and content will be logged and the content will be in hex format.
|
| log | back to summary |
|---|---|
| pack-priv static final Logger log | |
| UdpServer | back to summary |
|---|---|
| public UdpServer() | |
| attr | back to summary |
|---|---|
| public final <A> UdpServer attr(AttributeKey<A> key, A value) Overrides reactor. Doc from reactor. Update the given attribute key or remove it if the value is null.
| |
| bind | back to summary |
|---|---|
| public abstract Mono Binds the
| |
| bindAddress | back to summary |
|---|---|
| public final UdpServer bindAddress(Supplier<? extends SocketAddress> bindAddressSupplier) Overrides reactor. Doc from reactor. Set a new local address to which this transport should bind on subscribe.
| |
| bindNow | back to summary |
|---|---|
| public final Connection bindNow() Starts the server in a blocking fashion, and waits for it to finish initializing
or the startup timeout expires (the startup timeout is
| |
| bindNow | back to summary |
|---|---|
| public final Connection bindNow(Duration timeout) Start the server in a blocking fashion, and wait for it to finish initializing
or the provided startup timeout expires. The returned
| |
| create | back to summary |
|---|---|
| public static UdpServer create() Prepare a | |
| doOnBind | back to summary |
|---|---|
| public final UdpServer doOnBind(Consumer<? super UdpServerConfig> doOnBind) Set or add a callback called when
| |
| doOnBound | back to summary |
|---|---|
| public final UdpServer doOnBound(Consumer<? super Connection> doOnBound) Set or add a callback called after
| |
| doOnUnbound | back to summary |
|---|---|
| public final UdpServer doOnUnbound(Consumer<? super Connection> doOnUnbound) Set or add a callback called after
| |
| handle | back to summary |
|---|---|
| public final UdpServer handle(BiFunction<? super UdpInbound, ? super UdpOutbound, ? extends Publisher<Void>> handler) Attach an IO handler to react on connected client.
| |
| host | back to summary |
|---|---|
| public final UdpServer host(String host) The host to which this server should bind. | |
| metrics | back to summary |
|---|---|
| public final UdpServer metrics(boolean enable) Overrides reactor. Doc from reactor. Whether to enable metrics to be collected and registered in Micrometer's
MeterFilter filter = ... ; Metrics.globalRegistry.config().meterFilter(MeterFilter.maximumAllowableTags(prefix, 100, filter)); By default this is not enabled. | |
| metrics | back to summary |
|---|---|
| public final UdpServer metrics(boolean enable, Supplier<? extends ChannelMetricsRecorder> recorder) Overrides reactor. Doc from reactor. Specifies whether the metrics are enabled on the
| |
| observe | back to summary |
|---|---|
| public final UdpServer observe(ConnectionObserver observer) Overrides reactor. Doc from reactor. Set or add the given
| |
| option | back to summary |
|---|---|
| public final <O> UdpServer option(ChannelOption<O> key, O value) Overrides reactor. Doc from reactor. Update the given option key or remove it if the value is null. Note Setting
| |
| port | back to summary |
|---|---|
| public final UdpServer port(int port) The port to which this server should bind. | |
| runOn | back to summary |
|---|---|
| public final UdpServer runOn(EventLoopGroup eventLoopGroup) Overrides reactor. Doc from reactor. Run IO loops on the given
| |
| runOn | back to summary |
|---|---|
| public final UdpServer runOn(LoopResources channelResources) Overrides reactor. Doc from reactor. Run IO loops on a supplied
| |
| runOn | back to summary |
|---|---|
| public final UdpServer runOn(LoopResources loopResources, boolean preferNative) Overrides reactor. Run IO loops on a supplied
| |
| runOn | back to summary |
|---|---|
| public final UdpServer runOn(LoopResources loopResources, InternetProtocolFamily family) Run IO loops on a supplied
| |
| warmup | back to summary |
|---|---|
| public final Mono Based on the actual configuration, returns a
bind operation absorbs the extra time needed to load resources.
| |
| wiretap | back to summary |
|---|---|
| public final UdpServer wiretap(boolean enable) Overrides reactor. Doc from reactor. Apply or remove a wire logger configuration using | |
| wiretap | back to summary |
|---|---|
| public final UdpServer wiretap(String category) Overrides reactor. Doc from reactor. Apply a wire logger configuration using the specified category (logger),
| |
| wiretap | back to summary |
|---|---|
| public final UdpServer wiretap(String category, LogLevel level) Overrides reactor. Doc from reactor. Apply a wire logger configuration using the specified category (logger),
logger level and | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final BiFunction |
| Access | Constructor and Description |
|---|---|
| pack-priv | OnBoundHandle(BiFunction<? super UdpInbound, ? super UdpOutbound, ? extends Publisher<Void>> handler)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(Connection
the input argument c)Implements java. |
| handler | back to summary |
|---|---|
| pack-priv final BiFunction<? super UdpInbound, ? super UdpOutbound, ? extends Publisher<Void>> handler | |
| OnBoundHandle | back to summary |
|---|---|
| pack-priv OnBoundHandle(BiFunction<? super UdpInbound, ? super UdpOutbound, ? extends Publisher<Void>> handler) | |
| accept | back to summary |
|---|---|
| public void accept(Connection c) Implements java. Doc from java. Performs this operation on the given argument.
| |