connect() is ultimately called.
Example:
UdpClient.create()
.doOnConnect(startMetrics)
.doOnConnected(startedMetrics)
.doOnDisconnected(stopMetrics)
.host("127.0.0.1")
.port(1234)
.connect()
.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> UdpClient | attr(AttributeKey<A>
the key, A AttributeKey keythe value)AttributeKey valueOverrides reactor. |
| public final UdpClient | 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 Mono | connect()
Overrides reactor. ClientTransport and return a Mono of Connection.
|
| public final Connection | connectNow()
Overrides reactor. ClientTransport and return a Connection.
|
| public final Connection | connectNow(Duration
connect timeout (resolution: ns) timeout)Overrides reactor. ClientTransport and return a Connection.
|
| public static UdpClient | |
| public final UdpClient | doOnConnect(Consumer<? super UdpClientConfig>
a consumer observing connect events doOnConnect)Overrides reactor. ClientTransport is about to connect to the remote endpoint.
|
| public final UdpClient | doOnConnected(Consumer<? super Connection>
a consumer observing connected events doOnConnected)Overrides reactor. Connection has been connected.
|
| public final UdpClient | doOnDisconnected(Consumer<? super Connection>
a consumer observing disconnected events doOnDisconnected)Overrides reactor. Connection has been disconnected.
|
| public final UdpClient | Returns: a newUdpClient referencean IO handler that can dispose underlying connection when handler)Publisher terminates.Attach an IO handler to react on connected client |
| public final UdpClient | |
| public final UdpClient | metrics(boolean
true enables metrics collection; false disables it enable)Overrides reactor. globalRegistry.
|
| public final UdpClient | metrics(boolean
if true enables the metrics on the enable, Supplier<? extends ChannelMetricsRecorder> Transport.a supplier for the recorder)ChannelMetricsRecorderOverrides reactor. Transport.
|
| public final UdpClient | observe(ConnectionObserver
the observer)ConnectionObserver to be set or addOverrides reactor. ConnectionObserver to observe the connection state changes.
|
| public final <O> UdpClient | option(ChannelOption<O>
the key, O ChannelOption keythe value)ChannelOption value or nullOverrides reactor. |
| public final UdpClient | port(int
the port to connect to port)
The port to which this client should connect.
|
| public final UdpClient | remoteAddress(Supplier<? extends SocketAddress>
A supplier of the address to connect to. remoteAddressSupplier)Overrides reactor. |
| public final UdpClient | wiretap(boolean
specifies whether the wire logger configuration will be added to the pipeline enable)Overrides reactor. Transport category (logger),
DEBUG logger level and AdvancedBufferFormat#HEX_DUMP for Buffer format,
which means both events and content will be logged and the content will be in hex format.
|
| public final UdpClient | wiretap(String
the logger category category)Overrides reactor. DEBUG logger level and AdvancedBufferFormat#HEX_DUMP for Buffer format,
which means both events and content will be logged and the content will be in hex format.
|
| public final UdpClient | wiretap(String
the logger category category, LogLevel the logger level level)Overrides reactor. AdvancedBufferFormat#HEX_DUMP for Buffer 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 | |
| UdpClient | back to summary |
|---|---|
| public UdpClient() | |
| attr | back to summary |
|---|---|
| public final <A> UdpClient attr(AttributeKey<A> key, A value) Overrides reactor. Doc from reactor. Update the given attribute key or remove it if the value is null.
| |
| bindAddress | back to summary |
|---|---|
| public final UdpClient bindAddress(Supplier<? extends SocketAddress> bindAddressSupplier) Overrides reactor. Doc from reactor. Set a new local address to which this transport should bind on subscribe.
| |
| connect | back to summary |
|---|---|
| public final Mono Overrides reactor. Doc from reactor. Connect the
| |
| connectNow | back to summary |
|---|---|
| public final Connection connectNow() Overrides reactor. Doc from reactor. Block the
| |
| connectNow | back to summary |
|---|---|
| public final Connection connectNow(Duration timeout) Overrides reactor. Doc from reactor. Block the
| |
| create | back to summary |
|---|---|
| public static UdpClient create() Prepare a | |
| doOnConnect | back to summary |
|---|---|
| public final UdpClient doOnConnect(Consumer<? super UdpClientConfig> doOnConnect) Overrides reactor. Doc from reactor. Set or add a callback called when
| |
| doOnConnected | back to summary |
|---|---|
| public final UdpClient doOnConnected(Consumer<? super Connection> doOnConnected) Overrides reactor. Doc from reactor. Set or add a callback called after
| |
| doOnDisconnected | back to summary |
|---|---|
| public final UdpClient doOnDisconnected(Consumer<? super Connection> doOnDisconnected) Overrides reactor. Doc from reactor. Set or add a callback called after
| |
| handle | back to summary |
|---|---|
| public final UdpClient 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 UdpClient host(String host) Overrides reactor. Doc from reactor. The host to which this client should connect.
| |
| metrics | back to summary |
|---|---|
| public final UdpClient 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 UdpClient 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 UdpClient observe(ConnectionObserver observer) Overrides reactor. Doc from reactor. Set or add the given
| |
| option | back to summary |
|---|---|
| public final <O> UdpClient 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 UdpClient port(int port) Overrides reactor. Doc from reactor. The port to which this client should connect.
| |
| remoteAddress | back to summary |
|---|---|
| public final UdpClient remoteAddress(Supplier<? extends SocketAddress> remoteAddressSupplier) Overrides reactor. Doc from reactor. The address to which this client should connect on each subscribe.
| |
| wiretap | back to summary |
|---|---|
| public final UdpClient wiretap(boolean enable) Overrides reactor. Doc from reactor. Apply or remove a wire logger configuration using | |
| wiretap | back to summary |
|---|---|
| public final UdpClient wiretap(String category) Overrides reactor. Doc from reactor. Apply a wire logger configuration using the specified category (logger),
| |
| wiretap | back to summary |
|---|---|
| public final UdpClient 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 | OnConnectedHandle(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 | |
| OnConnectedHandle | back to summary |
|---|---|
| pack-priv OnConnectedHandle(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.
| |