Package | Description |
---|---|
rx |
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
|
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.subscriptions |
Default implementations for Subscription-based resource management
(Subscription container types) and utility classes to construct
Subscriptions from callbacks and other types.
|
Modifier and Type | Class and 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.
|
Modifier and Type | Method and Description |
---|---|
<S extends Scheduler & Subscription> |
Scheduler.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.
|
Modifier and Type | Method and Description |
---|---|
abstract Subscription |
Scheduler.Worker.schedule(Action0 action)
Schedules an Action for execution.
|
abstract Subscription |
Scheduler.Worker.schedule(Action0 action,
long delayTime,
TimeUnit unit)
Schedules an Action for execution at some point in the future.
|
Subscription |
Scheduler.Worker.schedulePeriodically(Action0 action,
long initialDelay,
long period,
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 |
Observable.subscribe()
Subscribes to an Observable and ignores
onNext and onCompleted emissions. |
Subscription |
Single.subscribe()
Subscribes to a Single but ignore its emission or notification.
|
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 Throwable> onError)
Subscribes to this Completable and calls back either the onError or onComplete functions.
|
Subscription |
Observable.subscribe(Action1<? super T> onNext)
Subscribes to an Observable and provides a callback to handle the items it emits.
|
Subscription |
Single.subscribe(Action1<? super T> onSuccess)
Subscribes to a Single and provides a callback to handle the item it emits.
|
Subscription |
Observable.subscribe(Action1<? super T> onNext,
Action1<Throwable> onError)
Subscribes to an Observable and provides callbacks to handle the items it emits and any error
notification it issues.
|
Subscription |
Single.subscribe(Action1<? super T> onSuccess,
Action1<Throwable> onError)
Subscribes to a Single and provides callbacks to handle the item it emits or any error notification it
issues.
|
Subscription |
Observable.subscribe(Action1<? super T> onNext,
Action1<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 |
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 a
SingleSubscriber that implements functions to handle the
item the Single emits or any error 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.
|
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 invokes
Observable.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 the
Single.OnSubscribe function without any contract protection,
error handling, unsubscribe, or execution hooks. |
Modifier and Type | Method and Description |
---|---|
void |
Subscriber.add(Subscription s)
Adds a
Subscription to this Subscriber's list of subscriptions if this list is not marked as
unsubscribed. |
void |
SingleSubscriber.add(Subscription s)
Adds a
Subscription 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.
|
Modifier and Type | Method and Description |
---|---|
protected Completable |
Completable.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.
|
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.
|
Modifier and Type | Method and Description |
---|---|
Subscription |
ConnectableObservable.connect()
Instructs the
ConnectableObservable to begin emitting the items from its underlying
Observable to its Subscriber s. |
Modifier and Type | Method and 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 the
ConnectableObservable to begin emitting the items from its underlying
Observable to its Subscriber s. |
Modifier and Type | Class and Description |
---|---|
class |
AsyncCompletableSubscriber
An abstract base class for CompletableSubscriber implementations that want to expose an unsubscription
capability.
|
class |
SafeCompletableSubscriber
Wraps another CompletableSubscriber and handles exceptions thrown
from onError and onCompleted.
|
class |
SafeSubscriber<T>
SafeSubscriber is a wrapper around Subscriber that ensures that the Subscriber
complies with the Observable contract. |
class |
SerializedSubscriber<T>
Enforces single-threaded, serialized, ordered execution of
SerializedSubscriber.onNext(T) , SerializedSubscriber.onCompleted() , and
SerializedSubscriber.onError(java.lang.Throwable) . |
class |
TestSubscriber<T>
A
TestSubscriber is a variety of Subscriber that you can use for unit testing, to perform
assertions, inspect received events, or wrap a mocked Subscriber . |
Modifier and Type | Method and Description |
---|---|
void |
SafeCompletableSubscriber.onSubscribe(Subscription d) |
void |
AsyncCompletableSubscriber.onSubscribe(Subscription d) |
Modifier and Type | Method and 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.
|
Modifier and Type | Method and 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.
|
Modifier and Type | Method and 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.
|
Modifier and Type | Method and 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.
|
Modifier and Type | Class and Description |
---|---|
class |
BooleanSubscription
Subscription that can be checked for status such as in a loop inside an
Observable 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 an
Observable 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.
|
class |
SerialSubscription
Represents a subscription whose underlying subscription can be swapped for another subscription which causes
the previous underlying subscription to be unsubscribed.
|
Modifier and Type | Method and Description |
---|---|
static Subscription |
Subscriptions.create(Action0 unsubscribe)
Creates and returns a
Subscription that invokes the given Action0 when unsubscribed. |
static Subscription |
Subscriptions.empty()
|
static Subscription |
Subscriptions.from(Future<?> f)
Converts a
Future into a Subscription and cancels it when unsubscribed. |
Subscription |
RefCountSubscription.get()
Returns a new sub-subscription
|
Subscription |
MultipleAssignmentSubscription.get()
Gets the underlying subscription.
|
Subscription |
SerialSubscription.get()
Retrieves the current
Subscription that is being represented by this SerialSubscription . |
static Subscription |
Subscriptions.unsubscribed()
Returns a
Subscription to which unsubscribe does nothing, as it is already unsubscribed. |
Modifier and Type | Method and Description |
---|---|
void |
CompositeSubscription.add(Subscription s)
Adds a new
Subscription to this CompositeSubscription if the
CompositeSubscription is not yet unsubscribed. |
void |
CompositeSubscription.addAll(Subscription... subscriptions)
Adds collection of
Subscription to this CompositeSubscription if the
CompositeSubscription is not yet unsubscribed. |
static CompositeSubscription |
Subscriptions.from(Subscription... subscriptions)
Converts a set of
Subscription s into a CompositeSubscription 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.
|
void |
SerialSubscription.set(Subscription s)
Swaps out the old
Subscription for the specified Subscription . |
Constructor and Description |
---|
CompositeSubscription(Subscription... subscriptions) |
RefCountSubscription(Subscription s)
Creates a
RefCountSubscription by wrapping the given non-null Subscription . |
Copyright © 2023. All rights reserved.