Top Description Methods
rx

public Interface Subscription

Known Direct Subinterfaces
rx.observers.AssertableSubscriber
Known Direct Implementers
rx.internal.operators.CachedObservable.ReplayProducer, rx.internal.operators.CompletableFromEmitter.FromEmitter, rx.internal.operators.OperatorGroupBy.State, rx.internal.operators.OperatorGroupByEvicting.State, rx.internal.operators.OperatorOnBackpressureLatest.LatestEmitter, rx.internal.operators.OperatorPublish.PublishSubscriber, rx.internal.operators.OperatorPublish.InnerProducer, rx.internal.operators.OnSubscribeFlatMapSingle.FlatMapSingleSubscriber.Requested, rx.internal.operators.OnSubscribeGroupJoin.ResultManager, rx.internal.operators.OnSubscribePublishMulticast, rx.internal.operators.OnSubscribePublishMulticast.PublishProducer, rx.internal.operators.OnSubscribeFlatMapCompletable.FlatMapCompletableSubscriber.InnerSubscriber, rx.internal.operators.OperatorReplay, rx.internal.operators.OperatorReplay.ReplaySubscriber, rx.internal.operators.OperatorReplay.InnerProducer, rx.internal.operators.OnSubscribeUsing.DisposeAction, rx.internal.operators.SingleFromEmitter.SingleEmitterImpl, rx.internal.operators.OnSubscribeCombineLatest.LatestCoordinator, rx.internal.operators.OnSubscribeCreate.BaseEmitter, rx.internal.operators.OnSubscribeDetach.DetachProducer, rx.internal.schedulers.ImmediateScheduler.InnerImmediateScheduler, rx.internal.schedulers.NewThreadWorker, rx.internal.schedulers.ScheduledAction, rx.internal.schedulers.ScheduledAction.FutureCompleter, rx.internal.schedulers.ScheduledAction.Remover, rx.internal.schedulers.ScheduledAction.Remover2, rx.internal.schedulers.SchedulerWhen, rx.internal.schedulers.SchedulerWhen.ScheduledAction, rx.internal.schedulers.TrampolineScheduler.InnerCurrentThreadScheduler, rx.internal.subscriptions.CancellableSubscription, rx.internal.subscriptions.SequentialSubscription, rx.internal.subscriptions.Unsubscribed, rx.internal.util.IndexedRingBuffer, rx.internal.util.RxRingBuffer, rx.internal.util.SubscriptionList, rx.observables.AsyncOnSubscribe.AsyncOuterManager, rx.observables.SyncOnSubscribe.SubscriptionProducer, rx.observers.AsyncCompletableSubscriber, rx.observers.AsyncCompletableSubscriber.Unsubscribed, rx.observers.SafeCompletableSubscriber, rx.subjects.PublishSubject.PublishSubjectProducer, rx.subjects.ReplaySubject.ReplayProducer, rx.subjects.UnicastSubject.State, rx.subscriptions.BooleanSubscription, rx.subscriptions.CompositeSubscription, rx.subscriptions.MultipleAssignmentSubscription, rx.subscriptions.RefCountSubscription, rx.subscriptions.RefCountSubscription.InnerSubscription, rx.subscriptions.SerialSubscription, rx.subscriptions.Subscriptions.FutureSubscription, rx.subscriptions.Subscriptions.Unsubscribed, rx.Scheduler.Worker, rx.SingleSubscriber, rx.Subscriber
Imports
rx.subscriptions.Subscriptions

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

Modifier and TypeMethod and Description
public boolean

Returns:

true if this Subscription is currently unsubscribed, false otherwise
isUnsubscribed
()

Indicates whether this Subscription is currently unsubscribed.

public void
unsubscribe()

Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received.

Method Detail

isUnsubscribedback to summary
public boolean isUnsubscribed()

Indicates whether this Subscription is currently unsubscribed.

Returns:boolean

true if this Subscription is currently unsubscribed, false otherwise

unsubscribeback to summary
public void 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).