Package io.servicetalk.concurrent
Interface CompletableSource.Subscriber
- All Known Subinterfaces:
CompletableSource.Processor
- All Known Implementing Classes:
TestCompletableSubscriber
- Enclosing interface:
- CompletableSource
public static interface CompletableSource.Subscriber
Subscriber of the outcome of a
Cancellable
.
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
Modifier and TypeMethodDescriptionvoid
Success terminal state.void
Failed terminal state.void
onSubscribe
(Cancellable cancellable) Called when the associatedCompletableSource
is subscribed viaCompletableSource.subscribe(Subscriber)
.
-
Method Details
-
onSubscribe
Called when the associatedCompletableSource
is subscribed viaCompletableSource.subscribe(Subscriber)
.- Parameters:
cancellable
- ACancellable
that can be used to cancel the asynchronous computation for this subscriber.
-
onComplete
void onComplete()Success terminal state.No further events will be sent.
-
onError
Failed terminal state.No further events will be sent.
- Parameters:
t
- the throwable signaled
-