Top Description Fields Constructors Methods
rx.observers

public final Class SafeCompletableSubscriber

extends Object
implements CompletableSubscriber, Subscription
Class Inheritance
All Implemented Interfaces
rx.Subscription, rx.CompletableSubscriber
Imports
rx.CompletableSubscriber, .Subscription, rx.exceptions.*, rx.plugins.RxJavaHooks

Wraps another CompletableSubscriber and handles exceptions thrown from onError and onCompleted.
Since
1.3

Field Summary

Modifier and TypeField and Description
pack-priv final CompletableSubscriber
pack-priv boolean
pack-priv Subscription
s

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.
public void
onCompleted()

Implements rx.CompletableSubscriber.onCompleted.

Called once the deferred computation completes normally.
public void
onError(Throwable
the exception, not null.
e
)

Implements rx.CompletableSubscriber.onError.

Called once if the deferred computation 'throws' an exception.
public void
onSubscribe(Subscription
the Subscription instance to call dispose on for cancellation, not null
d
)

Implements rx.CompletableSubscriber.onSubscribe.

Called once by the Completable to set a Subscription on this instance which then can be used to cancel the subscription at any time.
public void
unsubscribe()

Implements rx.Subscription.unsubscribe.

Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

actualback to summary
pack-priv final CompletableSubscriber actual
doneback to summary
pack-priv boolean done
sback to summary
pack-priv Subscription s

Constructor Detail

SafeCompletableSubscriberback to summary
public SafeCompletableSubscriber(CompletableSubscriber actual)

Method Detail

isUnsubscribedback to summary
public boolean isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Doc from rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.

Returns:boolean

true if this Subscription is currently unsubscribed, false otherwise

Annotations
@Override
onCompletedback to summary
public void onCompleted()

Implements rx.CompletableSubscriber.onCompleted.

Doc from rx.CompletableSubscriber.onCompleted.

Called once the deferred computation completes normally.

Annotations
@Override
onErrorback to summary
public void onError(Throwable e)

Implements rx.CompletableSubscriber.onError.

Doc from rx.CompletableSubscriber.onError.

Called once if the deferred computation 'throws' an exception.

Parameters
e:Throwable

the exception, not null.

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Subscription d)

Implements rx.CompletableSubscriber.onSubscribe.

Doc from rx.CompletableSubscriber.onSubscribe.

Called once by the Completable to set a Subscription on this instance which then can be used to cancel the subscription at any time.

Parameters
d:Subscription

the Subscription instance to call dispose on for cancellation, not null

Annotations
@Override
unsubscribeback to summary
public void unsubscribe()

Implements rx.Subscription.unsubscribe.

Doc from rx.Subscription.unsubscribe.

Stops the receipt of notifications on the Subscriber 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).

Annotations
@Override