Package rx
Interface Subscription
-
- All Known Implementing Classes:
ActionSubscriber,AsyncCompletableSubscriber,AsyncCompletableSubscriber.Unsubscribed,AsyncOnSubscribe.AsyncOuterManager,BlockingOperatorLatest.LatestObserverIterator,BlockingOperatorMostRecent.MostRecentObserver,BlockingOperatorNext.NextObserver,BlockingOperatorToIterator.SubscriberIterator,BooleanSubscription,CachedObservable.ReplayProducer,CachedThreadScheduler.EventLoopWorker,CachedThreadScheduler.ThreadWorker,CompletableOnSubscribeConcat.CompletableConcatSubscriber,CompletableOnSubscribeMerge.CompletableMergeSubscriber,CompositeSubscription,DeferredScalarSubscriber,EventLoopsScheduler.EventLoopWorker,EventLoopsScheduler.PoolWorker,ExecutorScheduler.ExecutorSchedulerWorker,ImmediateScheduler.InnerImmediateScheduler,IndexedRingBuffer,MultipleAssignmentSubscription,NewThreadWorker,ObserverSubscriber,OnSubscribeAmb.AmbSubscriber,OnSubscribeCollect.CollectSubscriber,OnSubscribeCombineLatest.CombinerSubscriber,OnSubscribeCombineLatest.LatestCoordinator,OnSubscribeConcatMap.ConcatMapInnerSubscriber,OnSubscribeConcatMap.ConcatMapSubscriber,OnSubscribeDetach.DetachProducer,OnSubscribeDetach.DetachSubscriber,OnSubscribeFilter.FilterSubscriber,OnSubscribeFlattenIterable.FlattenIterableSubscriber,OnSubscribeFromAsync.BaseAsyncEmitter,OnSubscribeFromAsync.BufferAsyncEmitter,OnSubscribeFromAsync.CancellableSubscription,OnSubscribeFromAsync.DropAsyncEmitter,OnSubscribeFromAsync.ErrorAsyncEmitter,OnSubscribeFromAsync.LatestAsyncEmitter,OnSubscribeFromAsync.NoneAsyncEmitter,OnSubscribeFromAsync.NoOverflowBaseAsyncEmitter,OnSubscribeGroupJoin.ResultManager,OnSubscribeGroupJoin.ResultManager.LeftDurationObserver,OnSubscribeGroupJoin.ResultManager.LeftObserver,OnSubscribeGroupJoin.ResultManager.RightDurationObserver,OnSubscribeGroupJoin.ResultManager.RightObserver,OnSubscribeGroupJoin.WindowObservableFunc.WindowSubscriber,OnSubscribeJoin.ResultSink.LeftSubscriber,OnSubscribeJoin.ResultSink.LeftSubscriber.LeftDurationSubscriber,OnSubscribeJoin.ResultSink.RightSubscriber,OnSubscribeJoin.ResultSink.RightSubscriber.RightDurationSubscriber,OnSubscribeMap.MapSubscriber,OnSubscribeOnAssembly.OnAssemblySubscriber,OnSubscribeOnAssemblySingle.OnAssemblySingleSubscriber,OnSubscribePublishMulticast,OnSubscribePublishMulticast.ParentSubscriber,OnSubscribePublishMulticast.PublishProducer,OnSubscribeReduce.ReduceSubscriber,OnSubscribeReduceSeed.ReduceSeedSubscriber,OnSubscribeTakeLastOne.TakeLastOneSubscriber,OnSubscribeUsing.DisposeAction,OperatorBufferWithSingleObservable.BufferingSubscriber,OperatorBufferWithSize.BufferExact,OperatorBufferWithSize.BufferOverlap,OperatorBufferWithSize.BufferSkip,OperatorBufferWithStartEndObservable.BufferingSubscriber,OperatorBufferWithTime.ExactSubscriber,OperatorBufferWithTime.InexactSubscriber,OperatorCast.CastSubscriber,OperatorDoOnRequest.ParentSubscriber,OperatorEagerConcatMap.EagerInnerSubscriber,OperatorEagerConcatMap.EagerOuterSubscriber,OperatorGroupBy.GroupBySubscriber,OperatorGroupBy.State,OperatorMapNotification.MapNotificationSubscriber,OperatorMapPair.MapPairSubscriber,OperatorMaterialize.ParentSubscriber,OperatorMerge.InnerSubscriber,OperatorMerge.MergeSubscriber,OperatorObserveOn.ObserveOnSubscriber,OperatorOnBackpressureBuffer.BufferSubscriber,OperatorOnBackpressureLatest.LatestEmitter,OperatorOnBackpressureLatest.LatestSubscriber,OperatorPublish.InnerProducer,OperatorPublish.PublishSubscriber,OperatorReplay.InnerProducer,OperatorReplay.ReplaySubscriber,OperatorRetryWithPredicate.SourceSubscriber,OperatorSampleWithTime.SamplerSubscriber,OperatorSingle.ParentSubscriber,OperatorSwitch.InnerSubscriber,OperatorSwitch.SwitchSubscriber,OperatorSwitchIfEmpty.AlternateSubscriber,OperatorSwitchIfEmpty.ParentSubscriber,OperatorTakeLast.TakeLastSubscriber,OperatorTakeLastTimed.TakeLastTimedSubscriber,OperatorTakeTimed.TakeSubscriber,OperatorTakeUntilPredicate.ParentSubscriber,OperatorTimeoutBase.TimeoutSubscriber,OperatorWindowWithObservable.BoundarySubscriber,OperatorWindowWithObservable.SourceSubscriber,OperatorWindowWithObservableFactory.BoundarySubscriber,OperatorWindowWithObservableFactory.SourceSubscriber,OperatorWindowWithSize.WindowExact,OperatorWindowWithSize.WindowOverlap,OperatorWindowWithSize.WindowSkip,OperatorWindowWithStartEndObservable.SourceSubscriber,OperatorWindowWithTime.ExactSubscriber,OperatorWindowWithTime.InexactSubscriber,OperatorWithLatestFromMany.WithLatestMainSubscriber,OperatorWithLatestFromMany.WithLatestOtherSubscriber,OperatorZip.Zip.InnerSubscriber,OperatorZip.ZipSubscriber,RefCountSubscription,RefCountSubscription.InnerSubscription,ReplaySubject.ReplayProducer,RxRingBuffer,SafeCompletableSubscriber,SafeSubscriber,ScheduledAction,ScheduledAction.FutureCompleter,ScheduledAction.Remover,ScheduledAction.Remover2,Scheduler.Worker,SchedulerWhen,SchedulerWhen.DelayedAction,SchedulerWhen.ImmediateAction,SchedulerWhen.ScheduledAction,SerializedSubscriber,SerialSubscription,SingleDoAfterTerminate.SingleDoAfterTerminateSubscriber,SingleOnSubscribeMap.MapSubscriber,SingleSubscriber,Subscriber,SubscriptionList,Subscriptions.FutureSubscription,Subscriptions.Unsubscribed,SyncOnSubscribe.SubscriptionProducer,TestScheduler.InnerTestScheduler,TestSubscriber,TrampolineScheduler.InnerCurrentThreadScheduler,UnicastSubject.State
public interface SubscriptionSubscription returns fromObservable.subscribe(Subscriber)to allow unsubscribing.See the utilities in
Subscriptionsand the implementations in therx.subscriptionspackage.This interface is the RxJava equivalent of
IDisposablein Microsoft's Rx implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisUnsubscribed()Indicates whether thisSubscriptionis currently unsubscribed.voidunsubscribe()Stops the receipt of notifications on theSubscriberthat was registered when this Subscription was received.
-
-
-
Method Detail
-
unsubscribe
void unsubscribe()
Stops the receipt of notifications on theSubscriberthat was registered when this Subscription was received.This allows unregistering an
Subscriberbefore it has finished receiving all events (i.e. before onCompleted is called).
-
isUnsubscribed
boolean isUnsubscribed()
Indicates whether thisSubscriptionis currently unsubscribed.- Returns:
trueif thisSubscriptionis currently unsubscribed,falseotherwise
-
-