T
- the value type emittedpublic interface MonoSink<T>
Modifier and Type | Method and Description |
---|---|
void |
error(Throwable e)
Terminate with the give exception
|
MonoSink<T> |
onCancel(Disposable d)
Associates a disposable resource with this MonoSink that will be disposed on
downstream.cancel().
|
MonoSink<T> |
onDispose(Disposable d)
Associates a disposable resource with this MonoSink that will be disposed on the
first terminate signal which may be a cancel, complete or error signal.
|
MonoSink<T> |
onRequest(LongConsumer consumer)
Attaches a
LongConsumer to this MonoSink that will be notified of
any request to this sink. |
void |
success()
Complete without any value.
|
void |
success(T value)
Complete with the given value.
|
void success()
Calling this method multiple times or after the other terminating methods has no effect.
void success(T value)
Calling this method multiple times or after the other
terminating methods has no effect. Calling this method with
a null
value will be silently accepted as a call to
success()
by standard implementations.
value
- the value to complete withvoid error(Throwable e)
Calling this method multiple times or after the other terminating methods has no effect.
e
- the exception to complete withMonoSink<T> onRequest(LongConsumer consumer)
LongConsumer
to this MonoSink
that will be notified of
any request to this sink.consumer
- the consumer to invoke on each requestMonoSink
with a consumer that is notified of requestsMonoSink<T> onCancel(Disposable d)
d
- the disposable callback to useMonoSink
with resource to be disposed on cancel signalMonoSink<T> onDispose(Disposable d)
d
- the disposable callback to useMonoSink
with resource to be disposed on first terminate signal