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.observables |
Classes extending the Observable base reactive class, synchronous and
asynchronous event generators.
|
rx.plugins |
Callback types and a central plugin handler class to hook into the lifecycle
of the base reactive types and schedulers.
|
rx.subjects |
Classes extending the Observable base reactive class and implementing
the Observer interface at the same time (aka hot Observables).
|
Modifier and Type | Class and Description |
---|---|
class |
Single<T>
The Single class implements the Reactive Pattern for a single value response.
|
class |
SingleSubscriber<T>
Provides a mechanism for receiving push-based notifications.
|
Modifier and Type | Method and Description |
---|---|
static <S,T> Observable<T> |
Observable.create(SyncOnSubscribe<S,T> syncOnSubscribe)
Returns an Observable that respects the back-pressure semantics.
|
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. |
<R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends R>> onNext,
Func1<? super Throwable,? extends Observable<? extends R>> onError,
Func0<? extends Observable<? extends R>> onCompleted,
int maxConcurrent)
Returns an Observable that applies a function to each item emitted or notification raised by the source
Observable and then flattens the Observables returned from these functions and emits the resulting items,
while limiting the maximum number of concurrent subscriptions to these Observables.
|
<R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends R>> func,
int maxConcurrent)
Returns an Observable that emits items based on applying a function that you supply to each item emitted
by the source Observable, where that function returns an Observable, and then merging those resulting
Observables and emitting the results of this merger, while limiting the maximum number of concurrent
subscriptions to these Observables.
|
<U,R> Observable<R> |
Observable.flatMap(Func1<? super T,? extends Observable<? extends U>> collectionSelector,
Func2<? super T,? super U,? extends R> resultSelector,
int maxConcurrent)
Returns an Observable that emits the results of a specified function to the pair of values emitted by the
source Observable and a specified collection Observable, while limiting the maximum number of concurrent
subscriptions to these Observables.
|
<R> Observable<R> |
Observable.flatMapIterable(Func1<? super T,? extends Iterable<? extends R>> collectionSelector,
int maxConcurrent)
Returns an Observable that merges each item emitted by the source Observable with the values in an
Iterable corresponding to that item that is generated by a selector, while limiting the number of concurrent
subscriptions to these Observables.
|
<U,R> Observable<R> |
Observable.flatMapIterable(Func1<? super T,? extends Iterable<? extends U>> collectionSelector,
Func2<? super T,? super U,? extends R> resultSelector,
int maxConcurrent)
Returns an Observable that emits the results of applying a function to the pair of values from the source
Observable and an Iterable corresponding to that item that is generated by a selector, while limiting the
number of concurrent subscriptions to these Observables.
|
static <T> Observable<T> |
Observable.fromCallable(Callable<? extends T> func)
Returns an Observable that, when an observer subscribes to it, invokes a function you specify and then
emits the value returned from that function.
|
static <T> Single<T> |
Single.fromCallable(Callable<? extends T> func)
Returns a
Single that invokes passed function and emits its result for each new Observer that subscribes. |
Single<T> |
Observable.toSingle()
Returns a Single that emits the single item emitted by the source Observable, if that Observable
emits only a single item.
|
Modifier and Type | Class and Description |
---|---|
interface |
Beta
Signifies that a public API (public class, method or field) is subject to
incompatible changes, or even removal, in a future release.
|
Modifier and Type | Class and Description |
---|---|
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()
Returns an Observable that automatically connects to this ConnectableObservable
when the first Subscriber subscribes.
|
Observable<T> |
ConnectableObservable.autoConnect(int numberOfSubscribers)
Returns an Observable that automatically connects to this ConnectableObservable
when the specified number of Subscribers subscribe to it.
|
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.
|
static <S,T> SyncOnSubscribe<S,T> |
SyncOnSubscribe.createSingleState(Func0<? extends S> generator,
Action2<? super S,? super Observer<? super T>> next)
Generates a synchronous
SyncOnSubscribe that calls the provided next function
to generate data to downstream subscribers. |
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> SyncOnSubscribe<S,T> |
SyncOnSubscribe.createStateful(Func0<? extends S> generator,
Func2<? super S,? super Observer<? super T>,? extends S> next)
Generates a synchronous
SyncOnSubscribe 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 <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. |
Modifier and Type | Method and Description |
---|---|
String |
RxJavaErrorHandler.handleOnNextValueRendering(Object item)
Receives items causing
OnErrorThrowable.OnNextValue and gives a chance to choose the String
representation of the item in the OnNextValue stacktrace rendering. |
protected String |
RxJavaErrorHandler.render(Object item)
Override this method to provide rendering for specific types other than primitive types and null.
|
Modifier and Type | Method and Description |
---|---|
Throwable |
ReplaySubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
PublishSubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
BehaviorSubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
AsyncSubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
T |
ReplaySubject.getValue() |
T |
BehaviorSubject.getValue()
Returns the current value of the Subject if there is such a value and
the subject hasn't terminated yet.
|
T |
AsyncSubject.getValue()
Returns the current value of the Subject if there is such a value and
the subject hasn't terminated with an exception.
|
Object[] |
ReplaySubject.getValues()
Returns a snapshot of the currently buffered non-terminal events.
|
Object[] |
BehaviorSubject.getValues()
Returns a snapshot of the currently buffered non-terminal events.
|
T[] |
ReplaySubject.getValues(T[] a)
Returns a snapshot of the currently buffered non-terminal events into
the provided
a array or creates a new array if it has not enough capacity. |
T[] |
BehaviorSubject.getValues(T[] a)
Returns a snapshot of the currently buffered non-terminal events into
the provided
a array or creates a new array if it has not enough capacity. |
boolean |
ReplaySubject.hasAnyValue() |
boolean |
ReplaySubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
PublishSubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
BehaviorSubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
AsyncSubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
ReplaySubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
PublishSubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
BehaviorSubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
AsyncSubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
ReplaySubject.hasValue() |
boolean |
BehaviorSubject.hasValue()
Check if the Subject has a value.
|
boolean |
AsyncSubject.hasValue()
Check if the Subject has a value.
|
int |
ReplaySubject.size()
Returns the current number of items (non-terminal events) available for replay.
|
Copyright © 2019. All rights reserved.