Package io.servicetalk.concurrent
Interface CompletableSource.Subscriber
-
- All Known Subinterfaces:
CompletableSource.Processor
- All Known Implementing Classes:
LegacyTestCompletable,LoggingCompletableSubscriber,TestCompletableSubscriber
- Enclosing interface:
- CompletableSource
public static interface CompletableSource.SubscriberSubscriber of the outcome of aCancellable.The semantics and threading model of this interface is meant to be the same as
PublisherSource.Subscriber, but simplified for the use case where the operations completes or fails with no data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonComplete()Success terminal state.voidonError(java.lang.Throwable t)Failed terminal state.voidonSubscribe(Cancellable cancellable)Called when the associatedCompletableSourceis subscribed viaCompletableSource.subscribe(Subscriber).
-
-
-
Method Detail
-
onSubscribe
void onSubscribe(Cancellable cancellable)
Called when the associatedCompletableSourceis subscribed viaCompletableSource.subscribe(Subscriber).- Parameters:
cancellable- ACancellablethat can be used to cancel the asynchronous computation for this subscriber.
-
onComplete
void onComplete()
Success terminal state.No further events will be sent.
-
onError
void onError(java.lang.Throwable t)
Failed terminal state.No further events will be sent.
- Parameters:
t- the throwable signaled
-
-