Package | Description |
---|---|
rx |
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
|
rx.functions |
Functional interfaces of functions and actions of arity 0 to 9 and related
utility classes.
|
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.
|
Modifier and Type | Interface and Description |
---|---|
static interface |
Completable.CompletableOnSubscribe
Callback used for building deferred computations that takes a CompletableSubscriber.
|
static interface |
Observable.OnSubscribe<T>
Invoked when Observable.subscribe is called.
|
static interface |
Single.OnSubscribe<T>
Invoked when Single.execute is called.
|
Modifier and Type | Method and Description |
---|---|
Observable<T> |
Observable.doOnEach(Action1<Notification<? super T>> onNotification)
Modifies the source Observable so that it invokes an action for each item it emits.
|
Completable |
Completable.doOnError(Action1<? super Throwable> onError)
Returns a Completable which calls the given onError callback if this Completable emits an error.
|
Observable<T> |
Observable.doOnError(Action1<Throwable> onError)
Modifies the source Observable so that it invokes an action if it calls
onError . |
Single<T> |
Single.doOnError(Action1<Throwable> onError)
Modifies the source
Single so that it invokes an action if it calls onError . |
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.
|
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.
|
Observable<T> |
Observable.doOnNext(Action1<? super T> onNext)
Modifies the source Observable so that it invokes an action when it calls
onNext . |
Observable<T> |
Observable.doOnRequest(Action1<Long> onRequest)
Modifies the source
Observable so that it invokes the given action when it receives a
request for more items. |
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.
|
Single<T> |
Single.doOnSuccess(Action1<? super T> onSuccess)
Modifies the source
Single so that it invokes an action when it calls onSuccess . |
void |
Observable.forEach(Action1<? super T> onNext)
Subscribes to the
Observable and receives notifications for each element. |
void |
Observable.forEach(Action1<? super T> onNext,
Action1<Throwable> onError)
Subscribes to the
Observable and receives notifications for each element and error events. |
void |
Observable.forEach(Action1<? super T> onNext,
Action1<Throwable> onError)
Subscribes to the
Observable and receives notifications for each element and error events. |
void |
Observable.forEach(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onComplete)
Subscribes to the
Observable and receives notifications for each element and the terminal events. |
void |
Observable.forEach(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onComplete)
Subscribes to the
Observable and receives notifications for each element and the terminal events. |
static <T> Observable<T> |
Observable.fromAsync(Action1<AsyncEmitter<T>> asyncEmitter,
AsyncEmitter.BackpressureMode backpressure)
Provides an API (via a cold Observable) that bridges the reactive world with the callback-style,
generally non-backpressured world.
|
Observable<T> |
Observable.onBackpressureDrop(Action1<? super T> onDrop)
Instructs an Observable that is emitting items faster than its observer can consume them to discard,
rather than emit, those items that its observer is not prepared to observe.
|
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 |
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 |
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(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.
|
static <R> Completable |
Completable.using(Func0<R> resourceFunc0,
Func1<? super R,? extends Completable> completableFunc1,
Action1<? super R> disposer)
Returns a Completable instance which manages a resource along
with a custom Completable instance while the subscription is active.
|
static <R> Completable |
Completable.using(Func0<R> resourceFunc0,
Func1<? super R,? extends Completable> completableFunc1,
Action1<? super R> disposer,
boolean eager)
Returns a Completable instance which manages a resource along
with a custom Completable instance while the subscription is active and performs eager or lazy
resource disposition.
|
static <T,Resource> |
Observable.using(Func0<Resource> resourceFactory,
Func1<? super Resource,? extends Observable<? extends T>> observableFactory,
Action1<? super Resource> disposeAction)
Constructs an Observable that creates a dependent resource object which is disposed of on unsubscription.
|
static <T,Resource> |
Observable.using(Func0<Resource> resourceFactory,
Func1<? super Resource,? extends Observable<? extends T>> observableFactory,
Action1<? super Resource> disposeAction,
boolean disposeEagerly)
Constructs an Observable that creates a dependent resource object which is disposed of just before
termination if you have set
disposeEagerly to true and unsubscription does not occur
before termination. |
static <T,Resource> |
Single.using(Func0<Resource> resourceFactory,
Func1<? super Resource,? extends Single<? extends T>> singleFactory,
Action1<? super Resource> disposeAction)
Constructs an Single that creates a dependent resource object which is disposed of on unsubscription.
|
static <T,Resource> |
Single.using(Func0<Resource> resourceFactory,
Func1<? super Resource,? extends Single<? extends T>> singleFactory,
Action1<? super Resource> disposeAction,
boolean disposeEagerly)
Constructs an Single that creates a dependent resource object which is disposed of just before
termination if you have set
disposeEagerly to true and unsubscription does not occur
before termination. |
Modifier and Type | Method and Description |
---|---|
<K,R> Observable<GroupedObservable<K,R>> |
Observable.groupBy(Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends R> elementSelector,
Func1<Action1<K>,Map<K,Object>> evictingMapFactory)
Groups the items emitted by an
Observable according to a specified criterion, and emits these
grouped items as GroupedObservable s. |
Modifier and Type | Method and Description |
---|---|
static <T> Action1<T> |
Actions.toAction1(Action0 action)
Wraps an Action0 instance into an Action1 instance where the latter calls
the former.
|
Modifier and Type | Method and Description |
---|---|
static <T0> FuncN<Void> |
Functions.fromAction(Action1<? super T0> f)
|
static <T1> Func1<T1,Void> |
Actions.toFunc(Action1<T1> action)
Converts an
Action1 to a function that calls the action and returns null . |
static <T1,R> Func1<T1,R> |
Actions.toFunc(Action1<T1> action,
R result)
Converts an
Action1 to a function that calls the action and returns a specified value. |
Modifier and Type | Class and Description |
---|---|
class |
AsyncOnSubscribe<S,T>
A utility class to create
OnSubscribe<T> functions that respond correctly to back
pressure requests from subscribers. |
class |
SyncOnSubscribe<S,T>
A utility class to create
OnSubscribe<T> functions that respond correctly to back
pressure requests from subscribers. |
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. |
static <S,T> SyncOnSubscribe<S,T> |
SyncOnSubscribe.createSingleState(Func0<? extends S> generator,
Action2<? super S,? super Observer<? super T>> next,
Action1<? super S> onUnsubscribe)
Generates a synchronous
SyncOnSubscribe that calls the provided next function
to generate data to downstream subscribers. |
static <S,T> AsyncOnSubscribe<S,T> |
AsyncOnSubscribe.createSingleState(Func0<? extends S> generator,
Action3<? super S,Long,? super Observer<Observable<? extends T>>> next,
Action1<? super S> onUnsubscribe)
Generates a synchronous
AsyncOnSubscribe that calls the provided next
function to generate data to downstream subscribers. |
static <S,T> SyncOnSubscribe<S,T> |
SyncOnSubscribe.createStateful(Func0<? extends S> generator,
Func2<? super S,? super Observer<? super T>,? extends S> next,
Action1<? super S> onUnsubscribe)
Generates a synchronous
SyncOnSubscribe that calls the provided next function
to generate data to downstream subscribers. |
static <S,T> AsyncOnSubscribe<S,T> |
AsyncOnSubscribe.createStateful(Func0<? extends S> generator,
Func3<? super S,Long,? super Observer<Observable<? extends T>>,? extends S> next,
Action1<? super S> onUnsubscribe)
Generates a synchronous
AsyncOnSubscribe that calls the provided next
function to generate data to downstream subscribers. |
static <T> SyncOnSubscribe<Void,T> |
SyncOnSubscribe.createStateless(Action1<? super Observer<? super T>> next)
Generates a synchronous
SyncOnSubscribe that calls the provided next function
to generate data to downstream subscribers. |
static <T> SyncOnSubscribe<Void,T> |
SyncOnSubscribe.createStateless(Action1<? super Observer<? super T>> next,
Action0 onUnsubscribe)
Generates a synchronous
SyncOnSubscribe that calls the provided next function
to generate data to downstream subscribers. |
void |
BlockingObservable.forEach(Action1<? super T> onNext)
Invokes a method on each item emitted by this
BlockingObservable and blocks until the Observable
completes. |
void |
BlockingObservable.subscribe(Action1<? super T> onNext)
Subscribes to the source and calls the given action on the current thread and rethrows any exception wrapped
into OnErrorNotImplementedException.
|
void |
BlockingObservable.subscribe(Action1<? super T> onNext,
Action1<? super Throwable> onError)
Subscribes to the source and calls the given actions on the current thread.
|
void |
BlockingObservable.subscribe(Action1<? super T> onNext,
Action1<? super Throwable> onError)
Subscribes to the source and calls the given actions on the current thread.
|
void |
BlockingObservable.subscribe(Action1<? super T> onNext,
Action1<? super Throwable> onError,
Action0 onCompleted)
Subscribes to the source and calls the given actions on the current thread.
|
void |
BlockingObservable.subscribe(Action1<? super T> onNext,
Action1<? super Throwable> onError,
Action0 onCompleted)
Subscribes to the source and calls the given actions on the current thread.
|
Modifier and Type | Method and Description |
---|---|
static <T> Subscriber<T> |
Subscribers.create(Action1<? super T> onNext)
Creates a
Subscriber that receives the emissions of any Observable it subscribes to via
onNext but ignores onCompleted notifications;
it will throw an OnErrorNotImplementedException if onError is invoked. |
static <T> Observer<T> |
Observers.create(Action1<? super T> onNext)
Creates an
Observer that receives the emissions of any Observable it subscribes to via
onNext but ignores onCompleted notifications;
it will throw an OnErrorNotImplementedException if onError is invoked. |
static <T> Subscriber<T> |
Subscribers.create(Action1<? super T> onNext,
Action1<Throwable> onError)
Creates an
Subscriber that receives the emissions of any Observable it subscribes to via
onNext and handles any onError notification but
ignores an onCompleted notification. |
static <T> Subscriber<T> |
Subscribers.create(Action1<? super T> onNext,
Action1<Throwable> onError)
Creates an
Subscriber that receives the emissions of any Observable it subscribes to via
onNext and handles any onError notification but
ignores an onCompleted notification. |
static <T> Observer<T> |
Observers.create(Action1<? super T> onNext,
Action1<Throwable> onError)
Creates an
Observer that receives the emissions of any Observable it subscribes to via
onNext and handles any onError notification but ignores
an onCompleted notification. |
static <T> Observer<T> |
Observers.create(Action1<? super T> onNext,
Action1<Throwable> onError)
Creates an
Observer that receives the emissions of any Observable it subscribes to via
onNext and handles any onError notification but ignores
an onCompleted notification. |
static <T> Subscriber<T> |
Subscribers.create(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onComplete)
Creates an
Subscriber that receives the emissions of any Observable it subscribes to via
onNext and handles any onError or
onCompleted notifications. |
static <T> Subscriber<T> |
Subscribers.create(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onComplete)
Creates an
Subscriber that receives the emissions of any Observable it subscribes to via
onNext and handles any onError or
onCompleted notifications. |
static <T> Observer<T> |
Observers.create(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onComplete)
Creates an
Observer that receives the emissions of any Observable it subscribes to via
onNext and handles any onError or
onCompleted notifications. |
static <T> Observer<T> |
Observers.create(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onComplete)
Creates an
Observer that receives the emissions of any Observable it subscribes to via
onNext and handles any onError or
onCompleted notifications. |
Modifier and Type | Method and Description |
---|---|
static Action1<Throwable> |
RxJavaHooks.getOnError()
Returns the current global error handler hook action or null if it is
set to the default one that signals errors to the current threads
UncaughtExceptionHandler.
|
Modifier and Type | Method and Description |
---|---|
static void |
RxJavaHooks.setOnError(Action1<Throwable> onError)
Sets the global error consumer action unless a lockdown is in effect.
|
Copyright © 2023. All rights reserved.