Subscription (RxJava Javadoc 1.3.8) (original) (raw)
- All Known Subinterfaces:
AssertableSubscriber
All Known Implementing Classes:
AsyncCompletableSubscriber, BooleanSubscription, CompositeSubscription, MultipleAssignmentSubscription, RefCountSubscription, SafeCompletableSubscriber, SafeSubscriber, Scheduler.Worker, SerializedSubscriber, SerialSubscription, SingleSubscriber, Subscriber, TestSubscriber
public interface Subscription
Subscription returns from Observable.subscribe(Subscriber) to allow unsubscribing.
See the utilities in Subscriptions and the implementations in the rx.subscriptions
package.
This interface is the RxJava equivalent of IDisposable
in Microsoft's Rx implementation.
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type Method and Description boolean isUnsubscribed() Indicates whether this Subscription is currently unsubscribed. void unsubscribe() Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received. Method Detail
* #### unsubscribe void unsubscribe() Stops the receipt of notifications on the [Subscriber](../rx/Subscriber.html "class in rx") that was registered when this Subscription was received. This allows deregistering an [Subscriber](../rx/Subscriber.html "class in rx") before it has finished receiving all events (i.e. before onCompleted is called). * #### isUnsubscribed boolean isUnsubscribed() Indicates whether this `Subscription` is currently unsubscribed. Returns: `true` if this `Subscription` is currently unsubscribed, `false` otherwise