@FunctionalInterface public interface DisposableChannel extends Disposable
Disposable.Composite, Disposable.Swap
Modifier and Type | Method and Description |
---|---|
default SocketAddress |
address()
When on the server, returns the bind address,
when on the client, returns the remote address.
|
Channel |
channel()
Returns the underlying
Channel . |
default void |
dispose()
Releases or closes the underlying
Channel . |
default void |
disposeNow()
Releases or closes the underlying
Channel in a blocking fashion with
3 seconds default timeout. |
default void |
disposeNow(Duration timeout)
Releases or closes the underlying
Channel in a blocking fashion with
the provided timeout. |
default CoreSubscriber<Void> |
disposeSubscriber()
Returns a
CoreSubscriber that will dispose on complete or error. |
default boolean |
isDisposed() |
default Mono<Void> |
onDispose()
Returns an observing
Mono terminating with success when shutdown
successfully or error. |
default DisposableChannel |
onDispose(Disposable onDispose)
Assigns a
Disposable to be invoked when the channel is closed. |
default SocketAddress address()
SocketAddress
Channel channel()
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.Channel
default void dispose()
Channel
.dispose
in interface Disposable
default void disposeNow()
Channel
in a blocking fashion with
3
seconds default timeout.default void disposeNow(Duration timeout)
Channel
in a blocking fashion with
the provided timeout.timeout
- max dispose timeout (resolution: ns)default CoreSubscriber<Void> disposeSubscriber()
CoreSubscriber
that will dispose on complete or error.default boolean isDisposed()
isDisposed
in interface Disposable
default Mono<Void> onDispose()
Mono
terminating with success when shutdown
successfully or error.Mono
terminating with success if shutdown successfully or errordefault DisposableChannel onDispose(Disposable onDispose)
Disposable
to be invoked when the channel is closed.onDispose
- the close event handler