Package | Description |
---|---|
rx |
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
|
rx.annotations |
Annotations for indicating experimental and beta operators, classes, methods, types or fields.
|
rx.exceptions |
Exception handling utilities, safe subscriber exception classes,
lifecycle exception 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.
|
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.singles |
Classes extending the Single base reactive class.
|
rx.subjects |
Classes extending the Observable base reactive class and implementing
the Observer interface at the same time (aka hot Observables).
|
Modifier and Type | Interface and Description |
---|---|
interface |
AsyncEmitter<T>
Abstraction over a RxJava Subscriber that allows associating
a resource with it and exposes the current number of downstream
requested amount.
|
class |
BackpressureOverflow
Generic strategy and default implementations to deal with backpressure buffer overflows.
|
class |
Completable
Represents a deferred computation without any value but only indication for completion or exception.
|
Modifier and Type | Method and Description |
---|---|
static <T> Observable<T> |
Observable.concatDelayError(Iterable<? extends Observable<? extends T>> sources)
Concatenates the Iterable sequence of Observables into a single sequence by subscribing to each Observable,
one after the other, one at a time and delays any errors till the all inner Observables terminate.
|
static <T> Observable<T> |
Observable.concatDelayError(Observable<? extends Observable<? extends T>> sources)
Concatenates the Observable sequence of Observables into a single sequence by subscribing to each inner Observable,
one after the other, one at a time and delays any errors till the all inner and the outer Observables terminate.
|
static <T> Observable<T> |
Observable.concatEager(Iterable<? extends Observable<? extends T>> sources)
Concatenates a sequence of Observables eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Iterable<? extends Observable<? extends T>> sources,
int capacityHint)
Concatenates a sequence of Observables eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Observable<? extends Observable<? extends T>> sources)
Concatenates an Observable sequence of Observables eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Observable<? extends Observable<? extends T>> sources,
int capacityHint)
Concatenates an Observable sequence of Observables eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Observable<? extends T> o1,
Observable<? extends T> o2)
Concatenates two source Observables eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Observable<? extends T> o1,
Observable<? extends T> o2,
Observable<? extends T> o3)
Concatenates three sources eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Observable<? extends T> o1,
Observable<? extends T> o2,
Observable<? extends T> o3,
Observable<? extends T> o4)
Concatenates four sources eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Observable<? extends T> o1,
Observable<? extends T> o2,
Observable<? extends T> o3,
Observable<? extends T> o4,
Observable<? extends T> o5)
Concatenates five sources eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Observable<? extends T> o1,
Observable<? extends T> o2,
Observable<? extends T> o3,
Observable<? extends T> o4,
Observable<? extends T> o5,
Observable<? extends T> o6)
Concatenates six sources eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Observable<? extends T> o1,
Observable<? extends T> o2,
Observable<? extends T> o3,
Observable<? extends T> o4,
Observable<? extends T> o5,
Observable<? extends T> o6,
Observable<? extends T> o7)
Concatenates seven sources eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Observable<? extends T> o1,
Observable<? extends T> o2,
Observable<? extends T> o3,
Observable<? extends T> o4,
Observable<? extends T> o5,
Observable<? extends T> o6,
Observable<? extends T> o7,
Observable<? extends T> o8)
Concatenates eight sources eagerly into a single stream of values.
|
static <T> Observable<T> |
Observable.concatEager(Observable<? extends T> o1,
Observable<? extends T> o2,
Observable<? extends T> o3,
Observable<? extends T> o4,
Observable<? extends T> o5,
Observable<? extends T> o6,
Observable<? extends T> o7,
Observable<? extends T> o8,
Observable<? extends T> o9)
Concatenates nine sources eagerly into a single stream of values.
|
<R> Observable<R> |
Observable.concatMapDelayError(Func1<? super T,? extends Observable<? extends R>> func)
Maps each of the items into an Observable, subscribes to them one after the other,
one at a time and emits their values in order
while delaying any error from either this or any of the inner Observables
till all of them terminate.
|
<R> Observable<R> |
Observable.concatMapEager(Func1<? super T,? extends Observable<? extends R>> mapper)
Maps a sequence of values into Observables and concatenates these Observables eagerly into a single
Observable.
|
<R> Observable<R> |
Observable.concatMapEager(Func1<? super T,? extends Observable<? extends R>> mapper,
int capacityHint)
Maps a sequence of values into Observables and concatenates these Observables eagerly into a single
Observable.
|
<R> Observable<R> |
Observable.concatMapEager(Func1<? super T,? extends Observable<? extends R>> mapper,
int capacityHint,
int maxConcurrent)
Maps a sequence of values into Observables and concatenates these Observables eagerly into a single
Observable.
|
static <S,T> Observable<T> |
Observable.create(AsyncOnSubscribe<S,T> asyncOnSubscribe)
Returns an Observable that respects the back-pressure semantics.
|
static <T> Single<T> |
Single.defer(Callable<Single<T>> singleFactory)
|
Single<T> |
Single.delay(long delay,
TimeUnit unit)
Returns an Single that emits the items emitted by the source Single shifted forward in time by a
specified delay.
|
Single<T> |
Single.delay(long delay,
TimeUnit unit,
Scheduler scheduler)
Returns an Single that emits the items emitted by the source Single shifted forward in time by a
specified delay.
|
Single<T> |
Single.delaySubscription(Observable<?> other)
Returns a Single that delays the subscription to this Single
until the Observable completes.
|
<U> Observable<T> |
Observable.delaySubscription(Observable<U> other)
Returns an Observable that delays the subscription to this Observable
until the other Observable emits an element or completes normally.
|
Observable<T> |
Observable.distinctUntilChanged(Func2<? super T,? super T,Boolean> comparator)
Returns an Observable that emits all items emitted by the source Observable that are distinct from their
immediate predecessors when compared with each other via the provided comparator function.
|
Single<T> |
Single.doAfterTerminate(Action0 action)
Registers an
Action0 to be called when this Single invokes either
SingleSubscriber.onSuccess(Object) onSuccess} or onError . |
Single<T> |
Single.doOnError(Action1<Throwable> onError)
Modifies the source
Single so that it invokes an action if it calls onError . |
Single<T> |
Single.doOnSubscribe(Action0 subscribe)
Modifies the source
Single so that it invokes the given action when it is subscribed from
its subscribers. |
Single<T> |
Single.doOnSuccess(Action1<? super T> onSuccess)
Modifies the source
Single so that it invokes an action when it calls onSuccess . |
Single<T> |
Single.doOnUnsubscribe(Action0 action)
Modifies the source
Single so that it invokes the given action when it is unsubscribed from
its subscribers. |
<R> R |
Observable.extend(Func1<? super Observable.OnSubscribe<T>,? extends R> conversion)
Passes all emitted values from this Observable to the provided conversion function to be collected and
returned as a single value.
|
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.
|
<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. |
<R> Single<R> |
Single.lift(Observable.Operator<? extends R,? super T> lift)
Lifts a function to the current Single and returns a new Single that when subscribed to will pass the
values of the current Single through the Operator function.
|
static <T> Observable<T> |
Observable.mergeDelayError(Observable<? extends Observable<? extends T>> source,
int maxConcurrent)
Flattens an Observable that emits Observables into one Observable, in a way that allows an Observer to
receive all successfully emitted items from all of the source Observables without being interrupted by
an error notification from one of them, while limiting the
number of concurrent subscriptions to these Observables.
|
Observable<T> |
Observable.onBackpressureBuffer(long capacity,
Action0 onOverflow,
BackpressureOverflow.Strategy overflowStrategy)
Instructs an Observable that is emitting items faster than its observer can consume them to buffer up to
a given amount of items until they can be emitted.
|
Single<T> |
Single.onErrorResumeNext(Func1<Throwable,? extends Single<? extends T>> resumeFunctionInCaseOfError)
Instructs a Single to pass control to another Single rather than invoking
Observer.onError(Throwable) if it encounters an error. |
Single<T> |
Single.onErrorResumeNext(Single<? extends T> resumeSingleInCaseOfError)
Instructs a Single to pass control to another Single rather than invoking
Observer.onError(Throwable) if it encounters an error. |
Observable<T> |
Observable.onTerminateDetach()
Nulls out references to the upstream producer and downstream Subscriber if
the sequence is terminated or downstream unsubscribes.
|
Observable<T> |
Observable.rebatchRequests(int n)
Requests
n initially from the upstream and then 75% of n subsequently
after 75% of n values have been emitted to the downstream. |
<R> Observable<R> |
Observable.switchMapDelayError(Func1<? super T,? extends Observable<? extends R>> func)
Returns a new Observable by applying a function that you supply to each item emitted by the source
Observable that returns an Observable, and then emitting the items emitted by the most recently emitted
of these Observables and delays any error until all Observables terminate.
|
static <T> Observable<T> |
Observable.switchOnNextDelayError(Observable<? extends Observable<? extends T>> sequenceOfSequences)
Converts an Observable that emits Observables into an Observable that emits the items emitted by the
most recently emitted of those Observables and delays any exception until all Observables terminate.
|
BlockingSingle<T> |
Single.toBlocking()
Converts a Single into a
BlockingSingle (a Single with blocking operators). |
Completable |
Observable.toCompletable()
Returns a Completable that discards all onNext emissions (similar to
ignoreAllElements() ) and calls onCompleted when this source observable calls
onCompleted. |
Completable |
Single.toCompletable()
Returns a
Completable that discards result of the Single (similar to
Observable.ignoreElements() ) and calls onCompleted when this source Single calls
onSuccess . |
Observable<List<T>> |
Observable.toSortedList(Func2<? super T,? super T,Integer> sortFunction,
int initialCapacity)
Returns an Observable that emits a list that contains the items emitted by the source Observable, in a
sorted order based on a specified comparison function.
|
Observable<List<T>> |
Observable.toSortedList(int initialCapacity)
Returns an Observable that emits a list that contains the items emitted by the source Observable, in a
sorted order.
|
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. |
<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.
|
<R> Observable<R> |
Observable.withLatestFrom(Iterable<Observable<?>> others,
FuncN<R> combiner)
Combines the value emission from this Observable with the latest emissions from the
other Observables via a function to produce the output item.
|
<R> Observable<R> |
Observable.withLatestFrom(Observable<?>[] others,
FuncN<R> combiner)
Combines the value emission from this Observable with the latest emissions from the
other Observables via a function to produce the output item.
|
<U,R> Observable<R> |
Observable.withLatestFrom(Observable<? extends U> other,
Func2<? super T,? super U,? extends R> resultSelector)
Merges the specified Observable into this Observable sequence by using the
resultSelector
function only when the source Observable (this instance) emits an item. |
<T1,T2,R> Observable<R> |
Observable.withLatestFrom(Observable<T1> o1,
Observable<T2> o2,
Func3<? super T,? super T1,? super T2,R> combiner)
Combines the value emission from this Observable with the latest emissions from the
other Observables via a function to produce the output item.
|
<T1,T2,T3,T4,T5,R> |
Observable.withLatestFrom(Observable<T1> o1,
Observable<T2> o2,
Observable<T1> o3,
Observable<T2> o4,
Observable<T1> o5,
Func6<? super T,? super T1,? super T2,? super T3,? super T4,? super T5,R> combiner)
Combines the value emission from this Observable with the latest emissions from the
other Observables via a function to produce the output item.
|
<T1,T2,T3,T4,T5,T6,R> |
Observable.withLatestFrom(Observable<T1> o1,
Observable<T2> o2,
Observable<T1> o3,
Observable<T2> o4,
Observable<T1> o5,
Observable<T2> o6,
Func7<? super T,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,R> combiner)
Combines the value emission from this Observable with the latest emissions from the
other Observables via a function to produce the output item.
|
<T1,T2,T3,T4,T5,T6,T7,R> |
Observable.withLatestFrom(Observable<T1> o1,
Observable<T2> o2,
Observable<T1> o3,
Observable<T2> o4,
Observable<T1> o5,
Observable<T2> o6,
Observable<T1> o7,
Func8<? super T,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,R> combiner)
Combines the value emission from this Observable with the latest emissions from the
other Observables via a function to produce the output item.
|
<T1,T2,T3,T4,T5,T6,T7,T8,R> |
Observable.withLatestFrom(Observable<T1> o1,
Observable<T2> o2,
Observable<T1> o3,
Observable<T2> o4,
Observable<T1> o5,
Observable<T2> o6,
Observable<T1> o7,
Observable<T2> o8,
Func9<? super T,? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,R> combiner)
Combines the value emission from this Observable with the latest emissions from the
other Observables via a function to produce the output item.
|
<T1,T2,T3,R> |
Observable.withLatestFrom(Observable<T1> o1,
Observable<T2> o2,
Observable<T3> o3,
Func4<? super T,? super T1,? super T2,? super T3,R> combiner)
Combines the value emission from this Observable with the latest emissions from the
other Observables via a function to produce the output item.
|
<T1,T2,T3,T4,R> |
Observable.withLatestFrom(Observable<T1> o1,
Observable<T2> o2,
Observable<T3> o3,
Observable<T4> o4,
Func5<? super T,? super T1,? super T2,? super T3,? super T4,R> combiner)
Combines the value emission from this Observable with the latest emissions from the
other Observables via a function to produce the output item.
|
static <R> Observable<R> |
Observable.zip(Observable<?>[] ws,
FuncN<? extends R> zipFunction)
Returns an Observable that emits the results of a specified combiner function applied to combinations of
items emitted, in sequence, by an array of other Observables.
|
Modifier and Type | Class and Description |
---|---|
interface |
Experimental
Signifies that a public API (public class, method or field) is will almost certainly
be changed or removed in a future release.
|
Modifier and Type | Class and Description |
---|---|
class |
AssemblyStackTraceException
A RuntimeException that is stackless but holds onto a textual
stacktrace from tracking the assembly location of operators.
|
Modifier and Type | Method and Description |
---|---|
static void |
Exceptions.throwOrReport(Throwable t,
Observer<?> o)
Forwards a fatal exception or reports it to the given Observer.
|
static void |
Exceptions.throwOrReport(Throwable t,
Observer<?> o,
Object value)
Forwards a fatal exception or reports it along with the value
caused it to the given Observer.
|
static void |
Exceptions.throwOrReport(Throwable throwable,
SingleSubscriber<?> subscriber)
Forwards a fatal exception or reports it to the given Observer.
|
Constructor and Description |
---|
CompositeException(Throwable... errors)
Constructs a CompositeException instance with the supplied initial Throwables.
|
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. |
Modifier and Type | Method and Description |
---|---|
static <S,T> AsyncOnSubscribe<S,T> |
AsyncOnSubscribe.createSingleState(Func0<? extends S> generator,
Action3<? super S,Long,? super Observer<Observable<? extends T>>> next)
Generates a synchronous
AsyncOnSubscribe 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> AsyncOnSubscribe<S,T> |
AsyncOnSubscribe.createStateful(Func0<? extends S> generator,
Func3<? super S,Long,? super Observer<Observable<? extends T>>,? extends S> next)
Generates a synchronous
AsyncOnSubscribe 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> AsyncOnSubscribe<Void,T> |
AsyncOnSubscribe.createStateless(Action2<Long,? super Observer<Observable<? extends T>>> next)
Generates a synchronous
AsyncOnSubscribe that calls the provided next
function to generate data to downstream subscribers. |
static <T> AsyncOnSubscribe<Void,T> |
AsyncOnSubscribe.createStateless(Action2<Long,? super Observer<Observable<? extends T>>> next,
Action0 onUnsubscribe)
Generates a synchronous
AsyncOnSubscribe that calls the provided next
function to generate data to downstream subscribers. |
void |
BlockingObservable.subscribe()
Runs the source observable to a terminal event, ignoring any values and rethrowing any exception.
|
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,
Action0 onCompleted)
Subscribes to the source and calls the given actions on the current thread.
|
void |
BlockingObservable.subscribe(Observer<? super T> observer)
Subscribes to the source and calls back the Observer methods on the current thread.
|
void |
BlockingObservable.subscribe(Subscriber<? super T> subscriber)
Subscribes to the source and calls the Subscriber methods on the current thread.
|
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
TestSubscriber.awaitValueCount(int expected,
long timeout,
TimeUnit unit)
Wait until the current committed value count is less than the expected amount
by sleeping 1 unit at most timeout times and return true if at least
the required amount of onNext values have been received.
|
int |
TestSubscriber.getCompletions()
Returns the number of times onCompleted was called on this TestSubscriber.
|
Modifier and Type | Class and Description |
---|---|
class |
RxJavaCompletableExecutionHook
Abstract ExecutionHook with invocations at different lifecycle points of
Completable execution with a
default no-op implementation. |
class |
RxJavaHooks
Utility class that holds hooks for various Observable, Single and Completable lifecycle-related
points as well as Scheduler hooks.
|
Modifier and Type | Method and Description |
---|---|
static Scheduler |
RxJavaSchedulersHook.createComputationScheduler()
Create an instance of the default
Scheduler used for Schedulers.computation() . |
static Scheduler |
RxJavaSchedulersHook.createComputationScheduler(ThreadFactory threadFactory)
Create an instance of the default
Scheduler used for Schedulers.computation()
except using threadFactory for thread creation. |
static Scheduler |
RxJavaSchedulersHook.createIoScheduler()
Create an instance of the default
Scheduler used for Schedulers.io() . |
static Scheduler |
RxJavaSchedulersHook.createIoScheduler(ThreadFactory threadFactory)
Create an instance of the default
Scheduler used for Schedulers.io()
except using threadFactory for thread creation. |
static Scheduler |
RxJavaSchedulersHook.createNewThreadScheduler()
Create an instance of the default
Scheduler used for Schedulers.newThread() . |
static Scheduler |
RxJavaSchedulersHook.createNewThreadScheduler(ThreadFactory threadFactory)
Create an instance of the default
Scheduler used for Schedulers.newThread()
except using threadFactory for thread creation. |
RxJavaCompletableExecutionHook |
RxJavaPlugins.getCompletableExecutionHook()
Retrieves the instance of
RxJavaCompletableExecutionHook to use based on order of precedence as
defined in RxJavaPlugins class header. |
void |
RxJavaPlugins.registerCompletableExecutionHook(RxJavaCompletableExecutionHook impl)
Register an
RxJavaCompletableExecutionHook implementation as a global override of any injected or
default implementations. |
void |
RxJavaPlugins.reset()
Reset
RxJavaPlugins instance |
Modifier and Type | Method and Description |
---|---|
static void |
Schedulers.reset()
Resets the current
Schedulers instance. |
Modifier and Type | Class and Description |
---|---|
class |
BlockingSingle<T>
BlockingSingle is a blocking "version" of Single that provides blocking
operators. |
Modifier and Type | Method and Description |
---|---|
static <T> BlockingSingle<T> |
BlockingSingle.from(Single<? extends T> single)
Converts a
Single into a BlockingSingle . |
Future<T> |
BlockingSingle.toFuture()
Returns a
Future representing the value emitted by this BlockingSingle . |
T |
BlockingSingle.value()
Returns the item emitted by this
BlockingSingle . |
Modifier and Type | Class and Description |
---|---|
class |
UnicastSubject<T>
A Subject variant which buffers events until a single Subscriber arrives and replays them to it
and potentially switches to direct delivery once the Subscriber caught up and requested an unlimited
amount.
|
Copyright © 2024. All rights reserved.