Uses of Interface
rx.Subscription
Packages that use Subscription
Package
Description
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
Operators that allow composing Observables to transform and
manipulate data in an asynchronous, functional and thread-safe manner.
Classes extending the Observable base reactive class, synchronous and
asynchronous event generators.
Default wrappers and implementations for the base reactive consumer classes and interfaces;
utility classes for creating them from callbacks.
Callback types and a central plugin handler class to hook into the lifecycle
of the base reactive types and schedulers.
Scheduler implementations, value+time record classes and the standard factory class to
return standard RxJava schedulers or wrap any Executor-based (thread pool) instances.
Classes extending the Observable base reactive class and implementing
the Observer interface at the same time (aka hot Observables).
Default implementations for Subscription-based resource management
(Subscription container types) and utility classes to construct
Subscriptions from callbacks and other types.
-
Uses of Subscription in rx
Classes in rx that implement SubscriptionModifier and TypeClassDescriptionstatic classSequential Scheduler for executing actions on a single thread or event loop.classProvides a mechanism for receiving push-based notifications.classSubscriber<T>Provides a mechanism for receiving push-based notifications from Observables, and permits manual unsubscribing from these Observables.Methods in rx with type parameters of type SubscriptionModifier and TypeMethodDescription<S extends Scheduler & Subscription>
SScheduler.when(Func1<Observable<Observable<Completable>>, Completable> combine) Allows the use of operators for controlling the timing around when actions scheduled on workers are actually done.Methods in rx that return SubscriptionModifier and TypeMethodDescriptionabstract SubscriptionSchedules an Action for execution.abstract SubscriptionSchedules an Action for execution at some point in the future.Scheduler.Worker.schedulePeriodically(Action0 action, long initialDelay, long period, TimeUnit unit) Schedules a cancelable action to be executed periodically.final SubscriptionCompletable.subscribe()Subscribes to this Completable and returns a Subscription which can be used to cancel the subscription.final SubscriptionSubscribes to this Completable and calls the given Action0 when this Completable completes normally.final SubscriptionSubscribes to this Completable and calls back either the onError or onComplete functions.final SubscriptionObservable.subscribe()Subscribes to an Observable and ignoresonNextandonCompletedemissions.final SubscriptionSubscribes to an Observable and provides a callback to handle the items it emits.final SubscriptionSubscribes to an Observable and provides callbacks to handle the items it emits and any error notification it issues.final SubscriptionSubscribes to an Observable and provides callbacks to handle the items it emits and any error or completion notification it issues.final SubscriptionSubscribes to an Observable and provides an Observer that implements functions to handle the items the Observable emits and any error or completion notification it issues.final SubscriptionObservable.subscribe(Subscriber<? super T> subscriber) Subscribes to an Observable and provides a Subscriber that implements functions to handle the items the Observable emits and any error or completion notification it issues.(package private) static <T> SubscriptionObservable.subscribe(Subscriber<? super T> subscriber, Observable<T> observable) final SubscriptionSingle.subscribe()Subscribes to a Single but ignore its emission or notification.final SubscriptionSubscribes to a Single and provides a callback to handle the item it emits.final SubscriptionSubscribes to a Single and provides callbacks to handle the item it emits or any error notification it issues.final SubscriptionSubscribes an Observer to this single and returns a Subscription that allows unsubscription.final SubscriptionSingle.subscribe(SingleSubscriber<? super T> te) Subscribes to a Single and provides aSingleSubscriberthat implements functions to handle the item the Single emits or any error notification it issues.final SubscriptionSingle.subscribe(Subscriber<? super T> subscriber) Subscribes to a Single and provides a Subscriber that implements functions to handle the item the Single emits or any error notification it issues.final SubscriptionObservable.unsafeSubscribe(Subscriber<? super T> subscriber) Subscribes to an Observable and invokesObservable.OnSubscribefunction without any contract protection, error handling, unsubscribe, or execution hooks.final SubscriptionSingle.unsafeSubscribe(Subscriber<? super T> subscriber) Subscribes to a Single and invokes theSingle.OnSubscribefunction without any contract protection, error handling, unsubscribe, or execution hooks.Methods in rx with parameters of type SubscriptionModifier and TypeMethodDescriptionfinal voidSingleSubscriber.add(Subscription s) Adds aSubscriptionto this Subscriber's list of subscriptions if this list is not marked as unsubscribed.final voidSubscriber.add(Subscription s) Adds aSubscriptionto this Subscriber's list of subscriptions if this list is not marked as unsubscribed.voidCompletable.CompletableSubscriber.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.voidAsyncEmitter.setSubscription(Subscription s) Sets a Subscription on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.Method parameters in rx with type arguments of type SubscriptionModifier and TypeMethodDescriptionprotected final CompletableCompletable.doOnLifecycle(Action1<? super Subscription> onSubscribe, Action1<? super Throwable> onError, Action0 onComplete, Action0 onAfterComplete, Action0 onUnsubscribe) Returns a Completable instance that calls the various callbacks on the specific lifecycle events.final CompletableCompletable.doOnSubscribe(Action1<? super Subscription> onSubscribe) Returns a Completable instance that calls the given onSubscribe callback with the disposable that child subscribers receive on subscription. -
Uses of Subscription in rx.internal.operators
Classes in rx.internal.operators that implement SubscriptionModifier and TypeClassDescription(package private) static final classObserver of source, iterator for output.(package private) static final class(package private) static final classstatic final class(package private) static final classKeeps track of the current request amount and the replay position for a child Subscriber.(package private) static final class(package private) static final classclassBase class for Subscribers that consume the entire upstream and signal zero or one element (or an error) in a backpressure honoring fashion.(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final classCallbacks from the child Subscriber.(package private) static final classThe parent subscriber that forwards events and cleans up on a terminal state.(package private) static final class(package private) static final class(package private) static class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static class(package private) final classManages sub-observers and subscriptions.(package private) final classObserve left duration and apply termination.(package private) final classObserve the left source.(package private) final classObserve right duration and apply termination.(package private) final classObserve the right source.(package private) final classObserve activities on the window.(package private) final classObserves the left values.(package private) final classObserves the left duration.(package private) final classObserves the right values.(package private) final classObserve the right duration.(package private) static final class(package private) static final class(package private) static final classfinal classMulticasts notifications coming through its input Subscriber view to its client Subscribers via lockstep backpressure mode.(package private) static final classThe subscriber that must be used for subscribing to the upstream source.(package private) static final classA Producer and Subscription that wraps a child Subscriber and manages its backpressure requests along with its unsubscription from the parent class.(package private) static final class(package private) static final class(package private) static final class(package private) static final classOnSubscribeUsing.DisposeAction<Resource>(package private) final class(package private) static final class(package private) static final class(package private) static final class(package private) final class(package private) final classSubscriber when exact timed chunking is required.(package private) final classSubscriber when the buffer chunking time and length differ.(package private) static final class(package private) static final class(package private) static final class(package private) static final classstatic final class(package private) static final class(package private) static final class(package private) static final class(package private) static class(package private) static final class(package private) static final classThe subscriber that observes Observables.(package private) static final classObserve through individual queue per observer.(package private) static final class(package private) static final classA terminable producer which emits the latest items on request.(package private) static final class(package private) static final classA Producer and Subscription that manages the request and unsubscription state of a child subscriber in thread-safe manner.(package private) static final class(package private) static final classA Producer and Subscription that manages the request and unsubscription state of a child subscriber in thread-safe manner.(package private) static final class(package private) static final class(package private) static final classThe source subscriber and sampler.(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final classSubscribed to source and scheduled on a worker.(package private) final classSubscriber returned to the upstream.(package private) static final class(package private) static final classObserves the boundary.(package private) static final classObserves the source.(package private) static final classObserves the boundary.(package private) static final classObserves the source.(package private) static final class(package private) static final class(package private) static final class(package private) final class(package private) final classSubscriber with exact, non-overlapping windows.(package private) final classSubscriber with inexact, potentially overlapping or discontinuous windows.(package private) static final class(package private) static final class(package private) final class(package private) final class(package private) static final class(package private) static final classFields in rx.internal.operators declared as SubscriptionModifier and TypeFieldDescription(package private) final SubscriptionOperatorWindowWithSize.WindowExact.cancel(package private) final SubscriptionOperatorWindowWithSize.WindowOverlap.cancel(package private) final SubscriptionOperatorWindowWithSize.WindowSkip.cancel(package private) SubscriptionOperatorMulticast.guardedSubscriptionprivate final SubscriptionOnSubscribeGroupJoin.WindowObservableFunc.WindowSubscriber.refFields in rx.internal.operators with type parameters of type SubscriptionModifier and TypeFieldDescription(package private) final Action1<? super Subscription> OnSubscribeAutoConnect.connectionMethods in rx.internal.operators that return SubscriptionModifier and TypeMethodDescriptionprivate SubscriptionOnSubscribeRefCount.disconnect(CompositeSubscription current) Methods in rx.internal.operators that return types with arguments of type SubscriptionModifier and TypeMethodDescriptionprivate Action1<Subscription> OnSubscribeRefCount.onSubscribe(Subscriber<? super T> subscriber, AtomicBoolean writeLocked) Methods in rx.internal.operators with parameters of type SubscriptionModifier and TypeMethodDescriptionprotected voidOnSubscribeJoin.ResultSink.LeftSubscriber.expire(int id, Subscription resource) (package private) voidOnSubscribeJoin.ResultSink.RightSubscriber.expire(int id, Subscription resource) voidCompletableOnSubscribeConcat.CompletableConcatSubscriber.ConcatInnerSubscriber.onSubscribe(Subscription d) voidCompletableOnSubscribeConcatArray.ConcatInnerSubscriber.onSubscribe(Subscription d) voidCompletableOnSubscribeConcatIterable.ConcatInnerSubscriber.onSubscribe(Subscription d) voidOnSubscribeOnAssemblyCompletable.OnAssemblyCompletableSubscriber.onSubscribe(Subscription d) final voidOnSubscribeFromAsync.BaseAsyncEmitter.setSubscription(Subscription s) Method parameters in rx.internal.operators with type arguments of type SubscriptionModifier and TypeMethodDescriptionvoidOperatorMulticast.connect(Action1<? super Subscription> connection) voidOperatorPublish.connect(Action1<? super Subscription> connection) voidOperatorReplay.connect(Action1<? super Subscription> connection) Constructors in rx.internal.operators with parameters of type SubscriptionModifierConstructorDescriptionWindowSubscriber(Subscriber<? super T> subscriber, Subscription ref) Constructor parameters in rx.internal.operators with type arguments of type SubscriptionModifierConstructorDescriptionOnSubscribeAutoConnect(ConnectableObservable<? extends T> source, int numberOfSubscribers, Action1<? super Subscription> connection) -
Uses of Subscription in rx.internal.schedulers
Classes in rx.internal.schedulers that implement SubscriptionModifier and TypeClassDescription(package private) static final class(package private) static final class(package private) static final class(package private) static final class(package private) static final classWorker that schedules tasks on the executor indirectly through a trampoline mechanism.private classclassfinal classARunnablethat executes anAction0and can be cancelled.(package private) final classCancels the captured future if the caller of the call method is not the same as the runner of the outer ScheduledAction to prevent unnecessary self-interrupting if the unsubscription happens from the same thread.(package private) static final classRemove a child subscription from a composite when unsubscribing.(package private) static final classRemove a child subscription from a composite when unsubscribing.classAllows the use of operators for controlling the timing around when actions scheduled on workers are actually done.private static classprivate static classprivate static class(package private) static final classFields in rx.internal.schedulers declared as SubscriptionModifier and TypeFieldDescriptionprivate static final SubscriptionSchedulerWhen.SUBSCRIBEDprivate final SubscriptionSchedulerWhen.subscriptionprivate static final SubscriptionSchedulerWhen.UNSUBSCRIBEDMethods in rx.internal.schedulers that return SubscriptionModifier and TypeMethodDescriptionprotected SubscriptionSchedulerWhen.DelayedAction.callActual(Scheduler.Worker actualWorker) protected SubscriptionSchedulerWhen.ImmediateAction.callActual(Scheduler.Worker actualWorker) protected abstract SubscriptionSchedulerWhen.ScheduledAction.callActual(Scheduler.Worker actualWorker) private SubscriptionTrampolineScheduler.InnerCurrentThreadScheduler.schedule(Action0 action, long delayTime, TimeUnit unit) EventLoopsScheduler.scheduleDirect(Action0 action) Schedules the action directly on one of the event loop workers without the additional infrastructure and checking.Methods in rx.internal.schedulers with parameters of type SubscriptionModifier and TypeMethodDescriptionvoidScheduledAction.add(Subscription s) Adds a general Subscription to thisScheduledActionthat will be unsubscribed if the underlyingactioncompletes or the this scheduled action is cancelled. -
Uses of Subscription in rx.internal.util
Classes in rx.internal.util that implement SubscriptionModifier and TypeClassDescriptionfinal classA Subscriber that forwards the onXXX method calls to callbacks.final classAdd/Remove without object allocation (after initial construction).final classWraps an Observer and forwards the onXXX method calls to it.classThis assumes Spsc or Spmc usage.final classSubscription that represents a group of Subscriptions that are unsubscribed together.Fields in rx.internal.util with type parameters of type SubscriptionModifier and TypeFieldDescription(package private) final Func1<Action0, Subscription> ScalarSynchronousObservable.ScalarAsyncOnSubscribe.onSchedule(package private) final Func1<Action0, Subscription> ScalarSynchronousObservable.ScalarAsyncProducer.onScheduleprivate List<Subscription> SubscriptionList.subscriptionsMethods in rx.internal.util with parameters of type SubscriptionModifier and TypeMethodDescriptionvoidSubscriptionList.add(Subscription s) static voidBlockingUtils.awaitForComplete(CountDownLatch latch, Subscription subscription) Blocks and waits for aSubscriptionto complete.voidSubscriptionList.remove(Subscription s) Method parameters in rx.internal.util with type arguments of type SubscriptionModifier and TypeMethodDescriptionprivate static voidSubscriptionList.unsubscribeFromAll(Collection<Subscription> subscriptions) Constructors in rx.internal.util with parameters of type SubscriptionModifierConstructorDescriptionConstructs a SubscriptionList with the given initial child subscription.SubscriptionList(Subscription... subscriptions) Constructs a SubscriptionList with the given initial child subscriptions.Constructor parameters in rx.internal.util with type arguments of type SubscriptionModifierConstructorDescription(package private)ScalarAsyncOnSubscribe(T value, Func1<Action0, Subscription> onSchedule) ScalarAsyncProducer(Subscriber<? super T> actual, T value, Func1<Action0, Subscription> onSchedule) -
Uses of Subscription in rx.observables
Classes in rx.observables that implement SubscriptionModifier and TypeClassDescription(package private) static final class(package private) static final classContains the producer loop that reacts to downstream requests of work.Methods in rx.observables that return SubscriptionModifier and TypeMethodDescriptionfinal SubscriptionConnectableObservable.connect()Instructs theConnectableObservableto begin emitting the items from its underlyingObservableto itsSubscribers.Method parameters in rx.observables with type arguments of type SubscriptionModifier and TypeMethodDescriptionConnectableObservable.autoConnect(int numberOfSubscribers, Action1<? super Subscription> connection) Returns an Observable that automatically connects to this ConnectableObservable when the specified number of Subscribers subscribe to it and calls the specified callback with the Subscription associated with the established connection.abstract voidConnectableObservable.connect(Action1<? super Subscription> connection) Instructs theConnectableObservableto begin emitting the items from its underlyingObservableto itsSubscribers. -
Uses of Subscription in rx.observers
Classes in rx.observers that implement SubscriptionModifier and TypeClassDescriptionclassAn abstract base class for CompletableSubscriber implementations that want to expose an unsubscription capability.(package private) static final classfinal classWraps another CompletableSubscriber and handles exceptions thrown from onError and onCompleted.classSafeSubscriberis a wrapper aroundSubscriberthat ensures that theSubscribercomplies with the Observable contract.classEnforces single-threaded, serialized, ordered execution ofSerializedSubscriber.onNext(T),SerializedSubscriber.onCompleted(), andSerializedSubscriber.onError(java.lang.Throwable).classATestSubscriberis a variety ofSubscriberthat you can use for unit testing, to perform assertions, inspect received events, or wrap a mockedSubscriber.Fields in rx.observers declared as SubscriptionFields in rx.observers with type parameters of type SubscriptionModifier and TypeFieldDescriptionprivate final AtomicReference<Subscription> AsyncCompletableSubscriber.upstreamHolds onto a deferred subscription and allows asynchronous cancellation before the call to onSubscribe() by the upstream.Methods in rx.observers with parameters of type SubscriptionModifier and TypeMethodDescriptionfinal voidAsyncCompletableSubscriber.onSubscribe(Subscription d) voidSafeCompletableSubscriber.onSubscribe(Subscription d) -
Uses of Subscription in rx.plugins
Fields in rx.plugins with type parameters of type SubscriptionModifier and TypeFieldDescription(package private) static Func1<Subscription, Subscription> RxJavaHooks.onObservableReturn(package private) static Func1<Subscription, Subscription> RxJavaHooks.onObservableReturn(package private) static Func1<Subscription, Subscription> RxJavaHooks.onSingleReturn(package private) static Func1<Subscription, Subscription> RxJavaHooks.onSingleReturnMethods in rx.plugins that return SubscriptionModifier and TypeMethodDescriptionstatic SubscriptionRxJavaHooks.onObservableReturn(Subscription subscription) Hook to call before the Observable.subscribe() method is about to return a Subscription.static SubscriptionRxJavaHooks.onSingleReturn(Subscription subscription) Hook to call before the Single.subscribe() method is about to return a Subscription.<T> SubscriptionRxJavaObservableExecutionHook.onSubscribeReturn(Subscription subscription) Deprecated.<T> SubscriptionRxJavaSingleExecutionHook.onSubscribeReturn(Subscription subscription) Deprecated.Methods in rx.plugins that return types with arguments of type SubscriptionModifier and TypeMethodDescriptionstatic Func1<Subscription, Subscription> RxJavaHooks.getOnObservableReturn()Returns the current Observable onReturn hook function or null if it is set to the default pass-through.static Func1<Subscription, Subscription> RxJavaHooks.getOnObservableReturn()Returns the current Observable onReturn hook function or null if it is set to the default pass-through.static Func1<Subscription, Subscription> RxJavaHooks.getOnSingleReturn()Returns the current Single onReturn hook function or null if it is set to the default pass-through.static Func1<Subscription, Subscription> RxJavaHooks.getOnSingleReturn()Returns the current Single onReturn hook function or null if it is set to the default pass-through.Methods in rx.plugins with parameters of type SubscriptionModifier and TypeMethodDescriptionstatic SubscriptionRxJavaHooks.onObservableReturn(Subscription subscription) Hook to call before the Observable.subscribe() method is about to return a Subscription.static SubscriptionRxJavaHooks.onSingleReturn(Subscription subscription) Hook to call before the Single.subscribe() method is about to return a Subscription.<T> SubscriptionRxJavaObservableExecutionHook.onSubscribeReturn(Subscription subscription) Deprecated.<T> SubscriptionRxJavaSingleExecutionHook.onSubscribeReturn(Subscription subscription) Deprecated.Method parameters in rx.plugins with type arguments of type SubscriptionModifier and TypeMethodDescriptionstatic voidRxJavaHooks.setOnObservableReturn(Func1<Subscription, Subscription> onObservableReturn) Sets a hook function that is called when the Observable.subscribe() call is about to return a Subscription unless a lockdown is in effect.static voidRxJavaHooks.setOnObservableReturn(Func1<Subscription, Subscription> onObservableReturn) Sets a hook function that is called when the Observable.subscribe() call is about to return a Subscription unless a lockdown is in effect.static voidRxJavaHooks.setOnSingleReturn(Func1<Subscription, Subscription> onSingleReturn) Sets a hook function that is called when the Single.subscribe() call is about to return a Subscription unless a lockdown is in effect.static voidRxJavaHooks.setOnSingleReturn(Func1<Subscription, Subscription> onSingleReturn) Sets a hook function that is called when the Single.subscribe() call is about to return a Subscription unless a lockdown is in effect. -
Uses of Subscription in rx.schedulers
Classes in rx.schedulers that implement SubscriptionMethods in rx.schedulers that return SubscriptionModifier and TypeMethodDescription -
Uses of Subscription in rx.subjects
Classes in rx.subjects that implement SubscriptionModifier and TypeClassDescription(package private) static final classA producer and subscription implementation that tracks the current replay position of a particular subscriber.(package private) static final classThe single-consumption replaying state. -
Uses of Subscription in rx.subscriptions
Classes in rx.subscriptions that implement SubscriptionModifier and TypeClassDescriptionfinal classSubscription that can be checked for status such as in a loop inside anObservableto exit the loop if unsubscribed.final classSubscription that represents a group of Subscriptions that are unsubscribed together.final classSubscription that can be checked for status such as in a loop inside anObservableto exit the loop if unsubscribed.final classKeeps track of the sub-subscriptions and unsubscribes the underlying subscription once all sub-subscriptions have unsubscribed.(package private) static final classThe individual sub-subscriptions.final classRepresents a subscription whose underlying subscription can be swapped for another subscription which causes the previous underlying subscription to be unsubscribed.(package private) static final classNaming classes helps with debugging.(package private) static final classNaming classes helps with debugging.Fields in rx.subscriptions declared as SubscriptionModifier and TypeFieldDescriptionprivate final SubscriptionRefCountSubscription.actual(package private) final SubscriptionMultipleAssignmentSubscription.State.subscription(package private) final SubscriptionSerialSubscription.State.subscriptionFields in rx.subscriptions with type parameters of type SubscriptionMethods in rx.subscriptions that return SubscriptionModifier and TypeMethodDescriptionstatic SubscriptionCreates and returns aSubscriptionthat invokes the givenAction0when unsubscribed.static SubscriptionSubscriptions.empty()static SubscriptionConverts aFutureinto aSubscriptionand cancels it when unsubscribed.MultipleAssignmentSubscription.get()Gets the underlying subscription.RefCountSubscription.get()Returns a new sub-subscriptionSerialSubscription.get()Retrieves the currentSubscriptionthat is being represented by thisSerialSubscription.static SubscriptionSubscriptions.unsubscribed()Returns aSubscriptionto whichunsubscribedoes nothing, as it is already unsubscribed.Methods in rx.subscriptions with parameters of type SubscriptionModifier and TypeMethodDescriptionvoidCompositeSubscription.add(Subscription s) Adds a newSubscriptionto thisCompositeSubscriptionif theCompositeSubscriptionis not yet unsubscribed.voidCompositeSubscription.addAll(Subscription... subscriptions) Adds collection ofSubscriptionto thisCompositeSubscriptionif theCompositeSubscriptionis not yet unsubscribed.static CompositeSubscriptionSubscriptions.from(Subscription... subscriptions) Converts a set ofSubscriptions into aCompositeSubscriptionthat groups the multiple Subscriptions together and unsubscribes from all of them together.voidCompositeSubscription.remove(Subscription s) voidMultipleAssignmentSubscription.set(Subscription s) Sets the underlying subscription.(package private) MultipleAssignmentSubscription.StateMultipleAssignmentSubscription.State.set(Subscription s) voidSerialSubscription.set(Subscription s) Swaps out the oldSubscriptionfor the specifiedSubscription.(package private) SerialSubscription.StateSerialSubscription.State.set(Subscription s) Method parameters in rx.subscriptions with type arguments of type SubscriptionModifier and TypeMethodDescriptionprivate static voidCompositeSubscription.unsubscribeFromAll(Collection<Subscription> subscriptions) Constructors in rx.subscriptions with parameters of type SubscriptionModifierConstructorDescriptionCompositeSubscription(Subscription... subscriptions) Creates aRefCountSubscriptionby wrapping the given non-nullSubscription.(package private)State(boolean u, Subscription s) (package private)State(boolean u, Subscription s)