Top Description Methods
reactor.netty5

public Interface DisposableChannel

extends Disposable
Known Direct Subinterfaces
reactor.netty5.DisposableServer, reactor.netty5.Connection
Annotations
@FunctionalInterface
Imports
java.net.SocketAddress, java.time.Duration, io.netty5.channel.Channel, io.netty5.channel.socket.DatagramChannel, reactor.core.CoreSubscriber, .Disposable, reactor.core.publisher.Mono

Holds contextual information for the underlying channel and provides non-blocking resource disposing API
Author
Stephane Maldini
Since
0.7

Method Summary

Modifier and TypeMethod and Description
public default SocketAddress

Returns:

SocketAddress
address
()

When on the server, returns the bind address, when on the client, returns the remote address.

public Channel

Returns:

the underlying Channel
channel
()

Returns the underlying Channel.

public default void
dispose()

Implements reactor.core.Disposable.dispose.

Releases or closes the underlying Channel
public default void
disposeNow()

Releases or closes the underlying Channel in a blocking fashion with 3 seconds default timeout.

public default void
disposeNow(Duration
max dispose timeout (resolution: ns)
timeout
)

Releases or closes the underlying Channel in a blocking fashion with the provided timeout.

public default CoreSubscriber<Void>
disposeSubscriber()

Returns a CoreSubscriber that will dispose on complete or error

public default boolean
isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
public default Mono<Void>

Returns:

a Mono terminating with success if shutdown successfully or error
onDispose
()

Returns an observing Mono terminating with success when shutdown successfully or error.

public default DisposableChannel

Returns:

this
onDispose
(Disposable
the close event handler
onDispose
)

Assigns a Disposable to be invoked when the channel is closed.

Method Detail

addressback to summary
public default SocketAddress address()

When on the server, returns the bind address, when on the client, returns the remote address.

Returns:SocketAddress

SocketAddress

channelback to summary
public Channel channel()

Returns the underlying Channel. Direct interaction might be considered insecure if that affects the underlying I/O processing such as read, write or close or state such as pipeline handler addition/removal.

Returns:Channel

the underlying Channel

disposeback to summary
public default void dispose()

Implements reactor.core.Disposable.dispose.

Releases or closes the underlying Channel

Annotations
@Override
@SuppressWarnings:FunctionalInterfaceMethodChanged
disposeNowback to summary
public default void disposeNow()

Releases or closes the underlying Channel in a blocking fashion with 3 seconds default timeout.

disposeNowback to summary
public default void disposeNow(Duration timeout)

Releases or closes the underlying Channel in a blocking fashion with the provided timeout.

Parameters
timeout:Duration

max dispose timeout (resolution: ns)

disposeSubscriberback to summary
public default CoreSubscriber<Void> disposeSubscriber()

Returns a CoreSubscriber that will dispose on complete or error

isDisposedback to summary
public default boolean isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Doc from reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.

Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.

Returns:boolean

true when there's a guarantee the resource or task is disposed.

Annotations
@Override
onDisposeback to summary
public default Mono<Void> onDispose()

Returns an observing Mono terminating with success when shutdown successfully or error.

Returns:Mono<Void>

a Mono terminating with success if shutdown successfully or error

onDisposeback to summary
public default DisposableChannel onDispose(Disposable onDispose)

Assigns a Disposable to be invoked when the channel is closed.

Parameters
onDispose:Disposable

the close event handler

Returns:DisposableChannel

this