public interface CompletableEmitter
CompletableSubscriber that gets either an onCompleted or onError
signal and allows registering an cancellation/unsubscription callback.
All methods are thread-safe; calling onCompleted or onError twice or one after the other has no effect.
| Modifier and Type | Method and Description |
|---|---|
void |
onCompleted()
Notifies the CompletableSubscriber that the
Completable has finished
sending push-based notifications. |
void |
onError(java.lang.Throwable t)
Notifies the CompletableSubscriber that the
Completable has experienced an error condition. |
void |
setCancellation(Cancellable c)
Sets a Cancellable on this emitter; any previous Subscription
or Cancellation will be unsubscribed/cancelled.
|
void |
setSubscription(Subscription s)
Sets a Subscription on this emitter; any previous Subscription
or Cancellation will be unsubscribed/cancelled.
|
void onCompleted()
Completable has finished
sending push-based notifications.
The Observable will not call this method if it calls onError(java.lang.Throwable).
void onError(java.lang.Throwable t)
Completable has experienced an error condition.
If the Completable calls this method, it will not thereafter call
onCompleted().
t - the exception encountered by the Observablevoid setSubscription(Subscription s)
s - the subscription, null is allowedvoid setCancellation(Cancellable c)
c - the cancellable resource, null is allowed