Uses of Interface
rx.Subscription
-
Packages that use Subscription Package Description rx Base reactive classes: Observable, Single and Completable; base reactive consumers; other common base interfaces.rx.internal.operators Operators that allow composing Observables to transform and manipulate data in an asynchronous, functional and thread-safe manner.rx.internal.schedulers rx.internal.util rx.observables Classes extending the Observable base reactive class, synchronous and asynchronous event generators.rx.observers Default wrappers and implementations for the base reactive consumer classes and interfaces; utility classes for creating them from callbacks.rx.plugins Callback types and a central plugin handler class to hook into the lifecycle of the base reactive types and schedulers.rx.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.rx.subjects Classes extending the Observable base reactive class and implementing the Observer interface at the same time (aka hot Observables).rx.subscriptions 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 Subscription Modifier and Type Class Description static class
Scheduler.Worker
Sequential Scheduler for executing actions on a single thread or event loop.class
SingleSubscriber<T>
Provides a mechanism for receiving push-based notifications.class
Subscriber<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 Subscription Modifier and Type Method Description <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 Subscription Modifier and Type Method Description abstract Subscription
Scheduler.Worker. schedule(Action0 action)
Schedules an Action for execution.abstract Subscription
Scheduler.Worker. schedule(Action0 action, long delayTime, java.util.concurrent.TimeUnit unit)
Schedules an Action for execution at some point in the future.Subscription
Scheduler.Worker. schedulePeriodically(Action0 action, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
Schedules a cancelable action to be executed periodically.Subscription
Completable. subscribe()
Subscribes to this Completable and returns a Subscription which can be used to cancel the subscription.Subscription
Completable. subscribe(Action0 onComplete)
Subscribes to this Completable and calls the given Action0 when this Completable completes normally.Subscription
Completable. subscribe(Action0 onComplete, Action1<? super java.lang.Throwable> onError)
Subscribes to this Completable and calls back either the onError or onComplete functions.Subscription
Observable. subscribe()
Subscribes to an Observable and ignoresonNext
andonCompleted
emissions.Subscription
Observable. subscribe(Action1<? super T> onNext)
Subscribes to an Observable and provides a callback to handle the items it emits.Subscription
Observable. subscribe(Action1<? super T> onNext, Action1<java.lang.Throwable> onError)
Subscribes to an Observable and provides callbacks to handle the items it emits and any error notification it issues.Subscription
Observable. subscribe(Action1<? super T> onNext, Action1<java.lang.Throwable> onError, Action0 onCompleted)
Subscribes to an Observable and provides callbacks to handle the items it emits and any error or completion notification it issues.Subscription
Observable. subscribe(Observer<? super T> observer)
Subscribes 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.Subscription
Observable. 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> Subscription
Observable. subscribe(Subscriber<? super T> subscriber, Observable<T> observable)
Subscription
Single. subscribe()
Subscribes to a Single but ignore its emission or notification.Subscription
Single. subscribe(Action1<? super T> onSuccess)
Subscribes to a Single and provides a callback to handle the item it emits.Subscription
Single. subscribe(Action1<? super T> onSuccess, Action1<java.lang.Throwable> onError)
Subscribes to a Single and provides callbacks to handle the item it emits or any error notification it issues.Subscription
Single. subscribe(Observer<? super T> observer)
Subscribes an Observer to this single and returns a Subscription that allows unsubscription.Subscription
Single. subscribe(SingleSubscriber<? super T> te)
Subscribes to a Single and provides aSingleSubscriber
that implements functions to handle the item the Single emits or any error notification it issues.Subscription
Single. 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.Subscription
Observable. unsafeSubscribe(Subscriber<? super T> subscriber)
Subscribes to an Observable and invokesObservable.OnSubscribe
function without any contract protection, error handling, unsubscribe, or execution hooks.Subscription
Single. unsafeSubscribe(Subscriber<? super T> subscriber)
Subscribes to a Single and invokes theSingle.OnSubscribe
function without any contract protection, error handling, unsubscribe, or execution hooks.Methods in rx with parameters of type Subscription Modifier and Type Method Description void
SingleSubscriber. add(Subscription s)
Adds aSubscription
to this Subscriber's list of subscriptions if this list is not marked as unsubscribed.void
Subscriber. add(Subscription s)
Adds aSubscription
to this Subscriber's list of subscriptions if this list is not marked as unsubscribed.void
Completable.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.void
AsyncEmitter. 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 Subscription Modifier and Type Method Description protected Completable
Completable. doOnLifecycle(Action1<? super Subscription> onSubscribe, Action1<? super java.lang.Throwable> onError, Action0 onComplete, Action0 onAfterComplete, Action0 onUnsubscribe)
Returns a Completable instance that calls the various callbacks on the specific lifecycle events.Completable
Completable. 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 Subscription Modifier and Type Class Description (package private) static class
BlockingOperatorLatest.LatestObserverIterator<T>
Observer of source, iterator for output.(package private) static class
BlockingOperatorMostRecent.MostRecentObserver<T>
(package private) static class
BlockingOperatorNext.NextObserver<T>
static class
BlockingOperatorToIterator.SubscriberIterator<T>
(package private) static class
CachedObservable.ReplayProducer<T>
Keeps track of the current request amount and the replay position for a child Subscriber.(package private) static class
CompletableOnSubscribeConcat.CompletableConcatSubscriber
(package private) static class
CompletableOnSubscribeMerge.CompletableMergeSubscriber
class
DeferredScalarSubscriber<T,R>
Base 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 class
OnSubscribeAmb.AmbSubscriber<T>
(package private) static class
OnSubscribeCollect.CollectSubscriber<T,R>
(package private) static class
OnSubscribeCombineLatest.CombinerSubscriber<T,R>
(package private) static class
OnSubscribeCombineLatest.LatestCoordinator<T,R>
(package private) static class
OnSubscribeConcatMap.ConcatMapInnerSubscriber<T,R>
(package private) static class
OnSubscribeConcatMap.ConcatMapSubscriber<T,R>
(package private) static class
OnSubscribeDetach.DetachProducer<T>
Callbacks from the child Subscriber.(package private) static class
OnSubscribeDetach.DetachSubscriber<T>
The parent subscriber that forwards events and cleans up on a terminal state.(package private) static class
OnSubscribeFilter.FilterSubscriber<T>
(package private) static class
OnSubscribeFlattenIterable.FlattenIterableSubscriber<T,R>
(package private) static class
OnSubscribeFromAsync.BaseAsyncEmitter<T>
(package private) static class
OnSubscribeFromAsync.BufferAsyncEmitter<T>
(package private) static class
OnSubscribeFromAsync.CancellableSubscription
(package private) static class
OnSubscribeFromAsync.DropAsyncEmitter<T>
(package private) static class
OnSubscribeFromAsync.ErrorAsyncEmitter<T>
(package private) static class
OnSubscribeFromAsync.LatestAsyncEmitter<T>
(package private) static class
OnSubscribeFromAsync.NoneAsyncEmitter<T>
(package private) static class
OnSubscribeFromAsync.NoOverflowBaseAsyncEmitter<T>
(package private) class
OnSubscribeGroupJoin.ResultManager
Manages sub-observers and subscriptions.(package private) class
OnSubscribeGroupJoin.ResultManager.LeftDurationObserver
Observe left duration and apply termination.(package private) class
OnSubscribeGroupJoin.ResultManager.LeftObserver
Observe the left source.(package private) class
OnSubscribeGroupJoin.ResultManager.RightDurationObserver
Observe right duration and apply termination.(package private) class
OnSubscribeGroupJoin.ResultManager.RightObserver
Observe the right source.(package private) class
OnSubscribeGroupJoin.WindowObservableFunc.WindowSubscriber
Observe activities on the window.(package private) class
OnSubscribeJoin.ResultSink.LeftSubscriber
Observes the left values.(package private) class
OnSubscribeJoin.ResultSink.LeftSubscriber.LeftDurationSubscriber
Observes the left duration.(package private) class
OnSubscribeJoin.ResultSink.RightSubscriber
Observes the right values.(package private) class
OnSubscribeJoin.ResultSink.RightSubscriber.RightDurationSubscriber
Observe the right duration.(package private) static class
OnSubscribeMap.MapSubscriber<T,R>
(package private) static class
OnSubscribeOnAssembly.OnAssemblySubscriber<T>
(package private) static class
OnSubscribeOnAssemblySingle.OnAssemblySingleSubscriber<T>
class
OnSubscribePublishMulticast<T>
Multicasts notifications coming through its input Subscriber view to its client Subscribers via lockstep backpressure mode.(package private) static class
OnSubscribePublishMulticast.ParentSubscriber<T>
The subscriber that must be used for subscribing to the upstream source.(package private) static class
OnSubscribePublishMulticast.PublishProducer<T>
A Producer and Subscription that wraps a child Subscriber and manages its backpressure requests along with its unsubscription from the parent class.(package private) static class
OnSubscribeReduce.ReduceSubscriber<T>
(package private) static class
OnSubscribeReduceSeed.ReduceSeedSubscriber<T,R>
(package private) static class
OnSubscribeTakeLastOne.TakeLastOneSubscriber<T>
(package private) static class
OnSubscribeUsing.DisposeAction<Resource>
(package private) class
OperatorBufferWithSingleObservable.BufferingSubscriber
(package private) static class
OperatorBufferWithSize.BufferExact<T>
(package private) static class
OperatorBufferWithSize.BufferOverlap<T>
(package private) static class
OperatorBufferWithSize.BufferSkip<T>
(package private) class
OperatorBufferWithStartEndObservable.BufferingSubscriber
(package private) class
OperatorBufferWithTime.ExactSubscriber
Subscriber when exact timed chunking is required.(package private) class
OperatorBufferWithTime.InexactSubscriber
Subscriber when the buffer chunking time and length differ.(package private) static class
OperatorCast.CastSubscriber<T,R>
(package private) static class
OperatorDoOnRequest.ParentSubscriber<T>
(package private) static class
OperatorEagerConcatMap.EagerInnerSubscriber<T>
(package private) static class
OperatorEagerConcatMap.EagerOuterSubscriber<T,R>
static class
OperatorGroupBy.GroupBySubscriber<T,K,V>
(package private) static class
OperatorGroupBy.State<T,K>
(package private) static class
OperatorMapNotification.MapNotificationSubscriber<T,R>
(package private) static class
OperatorMapPair.MapPairSubscriber<T,U,R>
(package private) static class
OperatorMaterialize.ParentSubscriber<T>
(package private) static class
OperatorMerge.InnerSubscriber<T>
(package private) static class
OperatorMerge.MergeSubscriber<T>
The subscriber that observes Observables.(package private) static class
OperatorObserveOn.ObserveOnSubscriber<T>
Observe through individual queue per observer.(package private) static class
OperatorOnBackpressureBuffer.BufferSubscriber<T>
(package private) static class
OperatorOnBackpressureLatest.LatestEmitter<T>
A terminable producer which emits the latest items on request.(package private) static class
OperatorOnBackpressureLatest.LatestSubscriber<T>
(package private) static class
OperatorPublish.InnerProducer<T>
A Producer and Subscription that manages the request and unsubscription state of a child subscriber in thread-safe manner.(package private) static class
OperatorPublish.PublishSubscriber<T>
(package private) static class
OperatorReplay.InnerProducer<T>
A Producer and Subscription that manages the request and unsubscription state of a child subscriber in thread-safe manner.(package private) static class
OperatorReplay.ReplaySubscriber<T>
(package private) static class
OperatorRetryWithPredicate.SourceSubscriber<T>
(package private) static class
OperatorSampleWithTime.SamplerSubscriber<T>
The source subscriber and sampler.(package private) static class
OperatorSingle.ParentSubscriber<T>
(package private) static class
OperatorSwitch.InnerSubscriber<T>
(package private) static class
OperatorSwitch.SwitchSubscriber<T>
(package private) static class
OperatorSwitchIfEmpty.AlternateSubscriber<T>
(package private) static class
OperatorSwitchIfEmpty.ParentSubscriber<T>
(package private) static class
OperatorTakeLast.TakeLastSubscriber<T>
(package private) static class
OperatorTakeLastTimed.TakeLastTimedSubscriber<T>
(package private) static class
OperatorTakeTimed.TakeSubscriber<T>
Subscribed to source and scheduled on a worker.(package private) class
OperatorTakeUntilPredicate.ParentSubscriber
Subscriber returned to the upstream.(package private) static class
OperatorTimeoutBase.TimeoutSubscriber<T>
(package private) static class
OperatorWindowWithObservable.BoundarySubscriber<T,U>
Observes the boundary.(package private) static class
OperatorWindowWithObservable.SourceSubscriber<T>
Observes the source.(package private) static class
OperatorWindowWithObservableFactory.BoundarySubscriber<T,U>
Observes the boundary.(package private) static class
OperatorWindowWithObservableFactory.SourceSubscriber<T,U>
Observes the source.(package private) static class
OperatorWindowWithSize.WindowExact<T>
(package private) static class
OperatorWindowWithSize.WindowOverlap<T>
(package private) static class
OperatorWindowWithSize.WindowSkip<T>
(package private) class
OperatorWindowWithStartEndObservable.SourceSubscriber
(package private) class
OperatorWindowWithTime.ExactSubscriber
Subscriber with exact, non-overlapping windows.(package private) class
OperatorWindowWithTime.InexactSubscriber
Subscriber with inexact, potentially overlapping or discontinuous windows.(package private) static class
OperatorWithLatestFromMany.WithLatestMainSubscriber<T,R>
(package private) static class
OperatorWithLatestFromMany.WithLatestOtherSubscriber
(package private) class
OperatorZip.Zip.InnerSubscriber
(package private) class
OperatorZip.ZipSubscriber
(package private) static class
SingleDoAfterTerminate.SingleDoAfterTerminateSubscriber<T>
(package private) static class
SingleOnSubscribeMap.MapSubscriber<T,R>
Fields in rx.internal.operators declared as Subscription Modifier and Type Field Description (package private) Subscription
OperatorWindowWithSize.WindowExact. cancel
(package private) Subscription
OperatorWindowWithSize.WindowOverlap. cancel
(package private) Subscription
OperatorWindowWithSize.WindowSkip. cancel
(package private) Subscription
OperatorMulticast. guardedSubscription
private Subscription
OnSubscribeGroupJoin.WindowObservableFunc.WindowSubscriber. ref
Fields in rx.internal.operators with type parameters of type Subscription Modifier and Type Field Description (package private) Action1<? super Subscription>
OnSubscribeAutoConnect. connection
Methods in rx.internal.operators that return Subscription Modifier and Type Method Description private Subscription
OnSubscribeRefCount. disconnect(CompositeSubscription current)
Methods in rx.internal.operators that return types with arguments of type Subscription Modifier and Type Method Description private Action1<Subscription>
OnSubscribeRefCount. onSubscribe(Subscriber<? super T> subscriber, java.util.concurrent.atomic.AtomicBoolean writeLocked)
Methods in rx.internal.operators with parameters of type Subscription Modifier and Type Method Description protected void
OnSubscribeJoin.ResultSink.LeftSubscriber. expire(int id, Subscription resource)
(package private) void
OnSubscribeJoin.ResultSink.RightSubscriber. expire(int id, Subscription resource)
void
CompletableOnSubscribeConcat.CompletableConcatSubscriber.ConcatInnerSubscriber. onSubscribe(Subscription d)
void
CompletableOnSubscribeConcatArray.ConcatInnerSubscriber. onSubscribe(Subscription d)
void
CompletableOnSubscribeConcatIterable.ConcatInnerSubscriber. onSubscribe(Subscription d)
void
OnSubscribeOnAssemblyCompletable.OnAssemblyCompletableSubscriber. onSubscribe(Subscription d)
void
OnSubscribeFromAsync.BaseAsyncEmitter. setSubscription(Subscription s)
Method parameters in rx.internal.operators with type arguments of type Subscription Modifier and Type Method Description void
OperatorMulticast. connect(Action1<? super Subscription> connection)
void
OperatorPublish. connect(Action1<? super Subscription> connection)
void
OperatorReplay. connect(Action1<? super Subscription> connection)
Constructors in rx.internal.operators with parameters of type Subscription Constructor Description WindowSubscriber(Subscriber<? super T> subscriber, Subscription ref)
Constructor parameters in rx.internal.operators with type arguments of type Subscription Constructor Description OnSubscribeAutoConnect(ConnectableObservable<? extends T> source, int numberOfSubscribers, Action1<? super Subscription> connection)
-
Uses of Subscription in rx.internal.schedulers
Classes in rx.internal.schedulers that implement Subscription Modifier and Type Class Description (package private) static class
CachedThreadScheduler.EventLoopWorker
(package private) static class
CachedThreadScheduler.ThreadWorker
(package private) static class
EventLoopsScheduler.EventLoopWorker
(package private) static class
EventLoopsScheduler.PoolWorker
(package private) static class
ExecutorScheduler.ExecutorSchedulerWorker
Worker that schedules tasks on the executor indirectly through a trampoline mechanism.private class
ImmediateScheduler.InnerImmediateScheduler
class
NewThreadWorker
class
ScheduledAction
ARunnable
that executes anAction0
and can be cancelled.(package private) class
ScheduledAction.FutureCompleter
Cancels 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 class
ScheduledAction.Remover
Remove a child subscription from a composite when unsubscribing.(package private) static class
ScheduledAction.Remover2
Remove a child subscription from a composite when unsubscribing.class
SchedulerWhen
Allows the use of operators for controlling the timing around when actions scheduled on workers are actually done.private static class
SchedulerWhen.DelayedAction
private static class
SchedulerWhen.ImmediateAction
private static class
SchedulerWhen.ScheduledAction
(package private) static class
TrampolineScheduler.InnerCurrentThreadScheduler
Fields in rx.internal.schedulers declared as Subscription Modifier and Type Field Description private static Subscription
SchedulerWhen. SUBSCRIBED
private Subscription
SchedulerWhen. subscription
private static Subscription
SchedulerWhen. UNSUBSCRIBED
Methods in rx.internal.schedulers that return Subscription Modifier and Type Method Description protected Subscription
SchedulerWhen.DelayedAction. callActual(Scheduler.Worker actualWorker)
protected Subscription
SchedulerWhen.ImmediateAction. callActual(Scheduler.Worker actualWorker)
protected abstract Subscription
SchedulerWhen.ScheduledAction. callActual(Scheduler.Worker actualWorker)
private Subscription
TrampolineScheduler.InnerCurrentThreadScheduler. enqueue(Action0 action, long execTime)
Subscription
CachedThreadScheduler.EventLoopWorker. schedule(Action0 action)
Subscription
CachedThreadScheduler.EventLoopWorker. schedule(Action0 action, long delayTime, java.util.concurrent.TimeUnit unit)
Subscription
EventLoopsScheduler.EventLoopWorker. schedule(Action0 action)
Subscription
EventLoopsScheduler.EventLoopWorker. schedule(Action0 action, long delayTime, java.util.concurrent.TimeUnit unit)
Subscription
ExecutorScheduler.ExecutorSchedulerWorker. schedule(Action0 action)
Subscription
ExecutorScheduler.ExecutorSchedulerWorker. schedule(Action0 action, long delayTime, java.util.concurrent.TimeUnit unit)
Subscription
ImmediateScheduler.InnerImmediateScheduler. schedule(Action0 action)
Subscription
ImmediateScheduler.InnerImmediateScheduler. schedule(Action0 action, long delayTime, java.util.concurrent.TimeUnit unit)
Subscription
NewThreadWorker. schedule(Action0 action)
Subscription
NewThreadWorker. schedule(Action0 action, long delayTime, java.util.concurrent.TimeUnit unit)
Subscription
TrampolineScheduler.InnerCurrentThreadScheduler. schedule(Action0 action)
Subscription
TrampolineScheduler.InnerCurrentThreadScheduler. schedule(Action0 action, long delayTime, java.util.concurrent.TimeUnit unit)
Subscription
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 Subscription Modifier and Type Method Description void
ScheduledAction. add(Subscription s)
Adds a general Subscription to thisScheduledAction
that will be unsubscribed if the underlyingaction
completes or the this scheduled action is cancelled. -
Uses of Subscription in rx.internal.util
Classes in rx.internal.util that implement Subscription Modifier and Type Class Description class
ActionSubscriber<T>
A Subscriber that forwards the onXXX method calls to callbacks.class
IndexedRingBuffer<E>
Add/Remove without object allocation (after initial construction).class
ObserverSubscriber<T>
Wraps an Observer and forwards the onXXX method calls to it.class
RxRingBuffer
This assumes Spsc or Spmc usage.class
SubscriptionList
Subscription that represents a group of Subscriptions that are unsubscribed together.Fields in rx.internal.util with type parameters of type Subscription Modifier and Type Field Description (package private) Func1<Action0,Subscription>
ScalarSynchronousObservable.ScalarAsyncOnSubscribe. onSchedule
(package private) Func1<Action0,Subscription>
ScalarSynchronousObservable.ScalarAsyncProducer. onSchedule
private java.util.List<Subscription>
SubscriptionList. subscriptions
Methods in rx.internal.util with parameters of type Subscription Modifier and Type Method Description void
SubscriptionList. add(Subscription s)
static void
BlockingUtils. awaitForComplete(java.util.concurrent.CountDownLatch latch, Subscription subscription)
Blocks and waits for aSubscription
to complete.void
SubscriptionList. remove(Subscription s)
Method parameters in rx.internal.util with type arguments of type Subscription Modifier and Type Method Description private static void
SubscriptionList. unsubscribeFromAll(java.util.Collection<Subscription> subscriptions)
Constructors in rx.internal.util with parameters of type Subscription Constructor Description SubscriptionList(Subscription s)
Constructs 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 Subscription Constructor Description 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 Subscription Modifier and Type Class Description (package private) static class
AsyncOnSubscribe.AsyncOuterManager<S,T>
(package private) static class
SyncOnSubscribe.SubscriptionProducer<S,T>
Contains the producer loop that reacts to downstream requests of work.Methods in rx.observables that return Subscription Modifier and Type Method Description Subscription
ConnectableObservable. connect()
Instructs theConnectableObservable
to begin emitting the items from its underlyingObservable
to itsSubscriber
s.Method parameters in rx.observables with type arguments of type Subscription Modifier and Type Method Description Observable<T>
ConnectableObservable. 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 void
ConnectableObservable. connect(Action1<? super Subscription> connection)
Instructs theConnectableObservable
to begin emitting the items from its underlyingObservable
to itsSubscriber
s. -
Uses of Subscription in rx.observers
Classes in rx.observers that implement Subscription Modifier and Type Class Description class
AsyncCompletableSubscriber
An abstract base class for CompletableSubscriber implementations that want to expose an unsubscription capability.(package private) static class
AsyncCompletableSubscriber.Unsubscribed
class
SafeCompletableSubscriber
Wraps another CompletableSubscriber and handles exceptions thrown from onError and onCompleted.class
SafeSubscriber<T>
SafeSubscriber
is a wrapper aroundSubscriber
that ensures that theSubscriber
complies with the Observable contract.class
SerializedSubscriber<T>
Enforces single-threaded, serialized, ordered execution ofSerializedSubscriber.onNext(T)
,SerializedSubscriber.onCompleted()
, andSerializedSubscriber.onError(java.lang.Throwable)
.class
TestSubscriber<T>
ATestSubscriber
is a variety ofSubscriber
that you can use for unit testing, to perform assertions, inspect received events, or wrap a mockedSubscriber
.Fields in rx.observers declared as Subscription Modifier and Type Field Description (package private) Subscription
SafeCompletableSubscriber. s
Fields in rx.observers with type parameters of type Subscription Modifier and Type Field Description private java.util.concurrent.atomic.AtomicReference<Subscription>
AsyncCompletableSubscriber. upstream
Holds onto a deferred subscription and allows asynchronous cancellation before the call to onSubscribe() by the upstream.Methods in rx.observers with parameters of type Subscription Modifier and Type Method Description void
AsyncCompletableSubscriber. onSubscribe(Subscription d)
void
SafeCompletableSubscriber. onSubscribe(Subscription d)
-
Uses of Subscription in rx.plugins
Fields in rx.plugins with type parameters of type Subscription Modifier and Type Field Description (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. onSingleReturn
Methods in rx.plugins that return Subscription Modifier and Type Method Description static Subscription
RxJavaHooks. onObservableReturn(Subscription subscription)
Hook to call before the Observable.subscribe() method is about to return a Subscription.static Subscription
RxJavaHooks. onSingleReturn(Subscription subscription)
Hook to call before the Single.subscribe() method is about to return a Subscription.<T> Subscription
RxJavaObservableExecutionHook. onSubscribeReturn(Subscription subscription)
Deprecated.<T> Subscription
RxJavaSingleExecutionHook. onSubscribeReturn(Subscription subscription)
Deprecated.Methods in rx.plugins that return types with arguments of type Subscription Modifier and Type Method Description 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. 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 Subscription Modifier and Type Method Description static Subscription
RxJavaHooks. onObservableReturn(Subscription subscription)
Hook to call before the Observable.subscribe() method is about to return a Subscription.static Subscription
RxJavaHooks. onSingleReturn(Subscription subscription)
Hook to call before the Single.subscribe() method is about to return a Subscription.<T> Subscription
RxJavaObservableExecutionHook. onSubscribeReturn(Subscription subscription)
Deprecated.<T> Subscription
RxJavaSingleExecutionHook. onSubscribeReturn(Subscription subscription)
Deprecated.Method parameters in rx.plugins with type arguments of type Subscription Modifier and Type Method Description static void
RxJavaHooks. 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 void
RxJavaHooks. 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 void
RxJavaHooks. 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 void
RxJavaHooks. 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 Subscription Modifier and Type Class Description (package private) class
TestScheduler.InnerTestScheduler
Methods in rx.schedulers that return Subscription Modifier and Type Method Description Subscription
TestScheduler.InnerTestScheduler. schedule(Action0 action)
Subscription
TestScheduler.InnerTestScheduler. schedule(Action0 action, long delayTime, java.util.concurrent.TimeUnit unit)
-
Uses of Subscription in rx.subjects
Classes in rx.subjects that implement Subscription Modifier and Type Class Description (package private) static class
ReplaySubject.ReplayProducer<T>
A producer and subscription implementation that tracks the current replay position of a particular subscriber.(package private) static class
UnicastSubject.State<T>
The single-consumption replaying state. -
Uses of Subscription in rx.subscriptions
Classes in rx.subscriptions that implement Subscription Modifier and Type Class Description class
BooleanSubscription
Subscription that can be checked for status such as in a loop inside anObservable
to exit the loop if unsubscribed.class
CompositeSubscription
Subscription that represents a group of Subscriptions that are unsubscribed together.class
MultipleAssignmentSubscription
Subscription that can be checked for status such as in a loop inside anObservable
to exit the loop if unsubscribed.class
RefCountSubscription
Keeps track of the sub-subscriptions and unsubscribes the underlying subscription once all sub-subscriptions have unsubscribed.(package private) static class
RefCountSubscription.InnerSubscription
The individual sub-subscriptions.class
SerialSubscription
Represents a subscription whose underlying subscription can be swapped for another subscription which causes the previous underlying subscription to be unsubscribed.(package private) static class
Subscriptions.FutureSubscription
Naming classes helps with debugging.(package private) static class
Subscriptions.Unsubscribed
Naming classes helps with debugging.Fields in rx.subscriptions declared as Subscription Modifier and Type Field Description private Subscription
RefCountSubscription. actual
(package private) Subscription
MultipleAssignmentSubscription.State. subscription
(package private) Subscription
SerialSubscription.State. subscription
Fields in rx.subscriptions with type parameters of type Subscription Modifier and Type Field Description private java.util.Set<Subscription>
CompositeSubscription. subscriptions
Methods in rx.subscriptions that return Subscription Modifier and Type Method Description static Subscription
Subscriptions. create(Action0 unsubscribe)
Creates and returns aSubscription
that invokes the givenAction0
when unsubscribed.static Subscription
Subscriptions. empty()
static Subscription
Subscriptions. from(java.util.concurrent.Future<?> f)
Converts aFuture
into aSubscription
and cancels it when unsubscribed.Subscription
MultipleAssignmentSubscription. get()
Gets the underlying subscription.Subscription
RefCountSubscription. get()
Returns a new sub-subscriptionSubscription
SerialSubscription. get()
Retrieves the currentSubscription
that is being represented by thisSerialSubscription
.static Subscription
Subscriptions. unsubscribed()
Returns aSubscription
to whichunsubscribe
does nothing, as it is already unsubscribed.Methods in rx.subscriptions with parameters of type Subscription Modifier and Type Method Description void
CompositeSubscription. add(Subscription s)
Adds a newSubscription
to thisCompositeSubscription
if theCompositeSubscription
is not yet unsubscribed.void
CompositeSubscription. addAll(Subscription... subscriptions)
Adds collection ofSubscription
to thisCompositeSubscription
if theCompositeSubscription
is not yet unsubscribed.static CompositeSubscription
Subscriptions. from(Subscription... subscriptions)
Converts a set ofSubscription
s into aCompositeSubscription
that groups the multiple Subscriptions together and unsubscribes from all of them together.void
CompositeSubscription. remove(Subscription s)
void
MultipleAssignmentSubscription. set(Subscription s)
Sets the underlying subscription.(package private) MultipleAssignmentSubscription.State
MultipleAssignmentSubscription.State. set(Subscription s)
void
SerialSubscription. set(Subscription s)
Swaps out the oldSubscription
for the specifiedSubscription
.(package private) SerialSubscription.State
SerialSubscription.State. set(Subscription s)
Method parameters in rx.subscriptions with type arguments of type Subscription Modifier and Type Method Description private static void
CompositeSubscription. unsubscribeFromAll(java.util.Collection<Subscription> subscriptions)
Constructors in rx.subscriptions with parameters of type Subscription Constructor Description CompositeSubscription(Subscription... subscriptions)
RefCountSubscription(Subscription s)
Creates aRefCountSubscription
by wrapping the given non-nullSubscription
.State(boolean u, Subscription s)
State(boolean u, Subscription s)
-