public final class SafeCompletableSubscriber extends java.lang.Object implements CompletableSubscriber, Subscription
| Constructor and Description |
|---|
SafeCompletableSubscriber(CompletableSubscriber actual) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isUnsubscribed()
Indicates whether this
Subscription is currently unsubscribed. |
void |
onCompleted()
Called once the deferred computation completes normally.
|
void |
onError(java.lang.Throwable e)
Called once if the deferred computation 'throws' an exception.
|
void |
onSubscribe(Subscription d)
Called once by the Completable to set a Subscription on this instance which
then can be used to cancel the subscription at any time.
|
void |
unsubscribe()
Stops the receipt of notifications on the
Subscriber that was registered when this Subscription
was received. |
public SafeCompletableSubscriber(CompletableSubscriber actual)
public void onCompleted()
CompletableSubscriberonCompleted in interface CompletableSubscriberpublic void onError(java.lang.Throwable e)
CompletableSubscriberonError in interface CompletableSubscribere - the exception, not null.public void onSubscribe(Subscription d)
CompletableSubscriberonSubscribe in interface CompletableSubscriberd - the Subscription instance to call dispose on for cancellation, not nullpublic void unsubscribe()
SubscriptionSubscriber that was registered when this Subscription
was received.
This allows deregistering an Subscriber before it has finished receiving all events (i.e. before
onCompleted is called).
unsubscribe in interface Subscriptionpublic boolean isUnsubscribed()
SubscriptionSubscription is currently unsubscribed.isUnsubscribed in interface Subscriptiontrue if this Subscription is currently unsubscribed, false otherwise