public interface TerminalSignalConsumer
PublisherSource.Subscriber
or a
CompletableSource.Subscriber
can terminate.Modifier and Type | Method and Description |
---|---|
void |
cancel()
Callback to indicate termination via
Cancellable.cancel() . |
static TerminalSignalConsumer |
from(java.lang.Runnable runnable)
Create a
TerminalSignalConsumer where each method executes a Runnable.run() . |
void |
onComplete()
Callback to indicate termination via
PublisherSource.Subscriber#onComplete() or
CompletableSource.Subscriber#onComplete() . |
void |
onError(java.lang.Throwable throwable)
Callback to indicate termination via
PublisherSource.Subscriber#onError(Throwable) or
CompletableSource.Subscriber#onError(Throwable) . |
void onComplete()
PublisherSource.Subscriber#onComplete()
or
CompletableSource.Subscriber#onComplete()
.void onError(java.lang.Throwable throwable)
PublisherSource.Subscriber#onError(Throwable)
or
CompletableSource.Subscriber#onError(Throwable)
.throwable
- the observed Throwable
.void cancel()
Cancellable.cancel()
.static TerminalSignalConsumer from(java.lang.Runnable runnable)
TerminalSignalConsumer
where each method executes a Runnable.run()
.runnable
- The Runnable
which is invoked in each method of the returned
TerminalSignalConsumer
.TerminalSignalConsumer
where each method executes a Runnable.run()
.