| Package | Description |
|---|---|
| rx |
Rx Observables
|
| rx.annotations | |
| rx.exceptions | |
| rx.internal.operators |
Operators that allow composing Observables to transform and manipulate data in an asynchronous, functional and thread-safe manner.
|
| rx.internal.util | |
| rx.observables | |
| rx.observers | |
| rx.plugins | |
| rx.singles | |
| rx.subjects | |
| rx.subscriptions |
| 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 <T> Observable |
Observable.concatEager(Iterable
Concatenates a sequence of Observables eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Iterable
Concatenates a sequence of Observables eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Observable
Concatenates an Observable sequence of Observables eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Observable
Concatenates an Observable sequence of Observables eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Observable
Concatenates two source Observables eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Observable
Concatenates three sources eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Observable
Concatenates four sources eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Observable
Concatenates five sources eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Observable
Concatenates six sources eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Observable
Concatenates seven sources eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Observable
Concatenates eight sources eagerly into a single stream of values.
|
static <T> Observable |
Observable.concatEager(Observable
Concatenates nine sources eagerly into a single stream of values.
|
<R> Observable |
Observable.concatMapEager(Func1
Maps a sequence of values into Observables and concatenates these Observables eagerly into a single Observable.
|
<R> Observable |
Observable.concatMapEager(Func1
Maps a sequence of values into Observables and concatenates these Observables eagerly into a single Observable.
|
static <T> Single |
Single.defer(Callable
|
Single |
Single.delay(long delay, TimeUnit
Returns an Single that emits the items emitted by the source Single shifted forward in time by a specified delay.
|
Single |
Single.delay(long delay, TimeUnit
Returns an Single that emits the items emitted by the source Single shifted forward in time by a specified delay.
|
Single |
Single.doOnError(Action1
Modifies the source
Single so that it invokes an action if it calls
onError.
|
Single |
Single.doOnSuccess(Action1
Modifies the source
Single so that it invokes an action when it calls
onSuccess.
|
<R> R |
Observable.extend(Func1
Passes all emitted values from this Observable to the provided conversion function to be collected and returned as a single value.
|
static <T> Single |
Single.fromCallable(Callable
Returns a
Single that invokes passed function and emits its result for each new Observer that subscribes.
|
static <T> Observable |
Observable.fromCallable(Callable
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> Observable |
Observable.merge(Observable
Flattens an Observable that emits Observables into a single Observable that emits the items emitted by those Observables, without any transformation, while limiting the maximum number of concurrent subscriptions to these Observables.
|
static <T> Observable |
Observable.merge(Observable
Flattens an Array of Observables into one Observable, without any transformation, while limiting the number of concurrent subscriptions to these Observables.
|
static <T> Observable |
Observable.mergeDelayError(Observable
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 |
Observable.onBackpressureBlock()
Deprecated.
The operator doesn't work properly with
Observable and is prone to deadlocks. It will be removed/unavailable starting from 1.1.
|
Observable |
Observable.onBackpressureBlock(int maxQueueLength)
Deprecated.
The operator doesn't work properly with
Observable and is prone to deadlocks. It will be removed/unavailable starting from 1.1.
|
Observable |
Observable.onBackpressureDrop(Action1
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.
|
Observable |
Observable.onBackpressureLatest()
Instructs an Observable that is emitting items faster than its observer can consume them to hold onto the latest value and emit that on request.
|
Observable |
Observable.switchIfEmpty(Observable
Returns an Observable that emits the items emitted by the source Observable or the items of an alternate Observable if the source Observable is empty.
|
Observable |
Observable.takeUntil(Func1
Returns an Observable that emits items emitted by the source Observable, checks the specified predicate for each item, and then completes if the condition is satisfied.
|
BlockingSingle |
Single.toBlocking()
Converts a Single into a
BlockingSingle (a Single with blocking operators).
|
Single |
Observable.toSingle()
Returns a Single that emits the single item emitted by the source Observable, if that Observable emits only a single item.
|
Observable |
Observable.toSortedList(Func2
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 |
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 |
Observable.using(Func0
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.
|
<U |
Observable.withLatestFrom(Observable
Merges the specified Observable into this Observable sequence by using the
resultSelector function only when the source Observable (this instance) emits an item.
|
| 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 | Method and Description |
|---|---|
static void |
Exceptions.throwIfAny(List
Throws a single or multiple exceptions contained in the collection, wrapping it into
CompositeException if necessary.
|
static void |
Exceptions.throwOrReport(Throwable
Forwards a fatal exception or reports it to the given Observer.
|
static void |
Exceptions.throwOrReport(Throwable
Forwards a fatal exception or reports it along with the value caused it to the given Observer.
|
| Modifier and Type | Class and Description |
|---|---|
class |
OperatorTakeUntilPredicate<T>
Returns an Observable that emits items emitted by the source Observable until the provided predicate returns false
|
| Modifier and Type | Class and Description |
|---|---|
class |
BackpressureDrainManager
Manages the producer-backpressure-consumer interplay by matching up available elements with requested elements and/or terminal events.
|
class |
BlockingUtils
Utility functions relating to blocking types.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
BlockingUtils.awaitForComplete(CountDownLatch
Blocks and waits for a
Subscription to complete.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractOnSubscribe<T
Abstract base class for the
Observable.OnSubscribe interface that helps you build Observable sources one
onNext at a time, and automatically supports unsubscription and backpressure.
|
class |
AsyncOnSubscribe<S
A utility class to create
OnSubscribe<T> functions that respond correctly to back pressure requests from subscribers.
|
class |
SyncOnSubscribe<S
A utility class to create
OnSubscribe<T> functions that respond correctly to back pressure requests from subscribers.
|
| Modifier and Type | Method and Description |
|---|---|
Observable |
ConnectableObservable.autoConnect()
Returns an Observable that automatically connects to this ConnectableObservable when the first Subscriber subscribes.
|
Observable |
ConnectableObservable.autoConnect(int numberOfSubscribers)
Returns an Observable that automatically connects to this ConnectableObservable when the specified number of Subscribers subscribe to it.
|
Observable |
ConnectableObservable.autoConnect(int numberOfSubscribers, Action1
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 |
SyncOnSubscribe.createSingleState(Func0
Generates a synchronous
SyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <S |
SyncOnSubscribe.createSingleState(Func0
Generates a synchronous
SyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <S |
AsyncOnSubscribe.createSingleState(Func0
Generates a synchronous
AsyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <S |
AsyncOnSubscribe.createSingleState(Func0
Generates a synchronous
AsyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <S |
SyncOnSubscribe.createStateful(Func0
Generates a synchronous
SyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <S |
SyncOnSubscribe.createStateful(Func0
Generates a synchronous
SyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <S |
AsyncOnSubscribe.createStateful(Func0
Generates a synchronous
AsyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <S |
AsyncOnSubscribe.createStateful(Func0
Generates a synchronous
AsyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <T> Observable |
SyncOnSubscribe.createStateless(Action1
Generates a synchronous
SyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <T> Observable |
SyncOnSubscribe.createStateless(Action1
Generates a synchronous
SyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <T> Observable |
AsyncOnSubscribe.createStateless(Action2
Generates a synchronous
AsyncOnSubscribe that calls the provided
next function to generate data to downstream subscribers.
|
static <T> Observable |
AsyncOnSubscribe.createStateless(Action2
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
Subscribes to the source and calls the given action on the current thread and rethrows any exception wrapped into OnErrorNotImplementedException.
|
void |
BlockingObservable.subscribe(Action1
Subscribes to the source and calls the given actions on the current thread.
|
void |
BlockingObservable.subscribe(Action1
Subscribes to the source and calls the given actions on the current thread.
|
void |
BlockingObservable.subscribe(Observer
Subscribes to the source and calls back the Observer methods on the current thread.
|
void |
BlockingObservable.subscribe(Subscriber
Subscribes to the source and calls the Subscriber methods on the current thread.
|
| Modifier and Type | Method and Description |
|---|---|
void |
TestSubscriber.assertCompleted()
Asserts that there is exactly one completion event.
|
void |
TestSubscriber.assertError(Class
Asserts that there is exactly one error event which is a subclass of the given class.
|
void |
TestSubscriber.assertError(Throwable
Asserts that there is a single onError event with the exact exception.
|
void |
TestSubscriber.assertNotCompleted()
Asserts that there is no completion event.
|
void |
TestSubscriber.assertNoTerminalEvent()
Asserts that there are no onError and onCompleted events.
|
void |
TestSubscriber.assertNoValues()
Asserts that there are no onNext events received.
|
void |
TestSubscriber.assertValue(T value)
Asserts that there is only a single received onNext event and that it marks the emission of a specific item.
|
void |
TestSubscriber.assertValueCount(int count)
Asserts that the given number of onNext events are received.
|
void |
TestSubscriber.assertValues(T... values)
Asserts that the received onNext events, in order, are the specified items.
|
static <T> TestSubscriber |
TestSubscriber.create()
|
static <T> TestSubscriber |
TestSubscriber.create(long initialRequest)
|
static <T> TestSubscriber |
TestSubscriber.create(Observer
|
static <T> TestSubscriber |
TestSubscriber.create(Observer
|
static <T> TestSubscriber |
TestSubscriber.create(Subscriber
|
static <T> Subscriber |
Subscribers.wrap(Subscriber
Returns a new
Subscriber that passes all events to
subscriber, has backpressure controlled by
subscriber and uses the subscription list of
subscriber when
Subscriber is called.
|
| Constructor and Description | |
|---|---|
TestSubscriber(long initialRequest)
Constructs a TestSubscriber with the initial request to be requested from upstream.
|
|
TestSubscriber(Observer
Constructs a TestSubscriber with the initial request to be requested from upstream and a delegate Observer to wrap.
|
| Modifier and Type | Method and Description |
|---|---|
String |
RxJavaErrorHandler.handleOnNextValueRendering(Object
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
Override this method to provide rendering for specific types other than primitive types and null.
|
| 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 |
BlockingSingle.from(Single
Converts a
Single into a
BlockingSingle.
|
Future |
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 | Method and Description |
|---|---|
Throwable |
Subject.getThrowable()
Deprecated.
this method will be moved to each Subject class individually in the next release
|
Throwable |
AsyncSubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
BehaviorSubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
SerializedSubject.getThrowable()
Deprecated.
this method is scheduled to be removed in the next release
|
Throwable |
PublishSubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
ReplaySubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
T |
Subject.getValue()
Deprecated.
this method will be moved to each Subject class individually in the next release
|
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.
|
T |
BehaviorSubject.getValue()
Returns the current value of the Subject if there is such a value and the subject hasn't terminated yet.
|
T |
SerializedSubject.getValue()
Deprecated.
this method is scheduled to be removed in the next release
|
T |
PublishSubject.getValue()
Deprecated.
this method is scheduled to be removed in the next release
|
T |
ReplaySubject.getValue()
|
Object |
Subject.getValues()
Deprecated.
this method will be moved to each Subject class individually in the next release
|
Object |
SerializedSubject.getValues()
Deprecated.
this method is scheduled to be removed in the next release
|
Object |
PublishSubject.getValues()
Deprecated.
this method is scheduled to be removed in the next release
|
T[] |
Subject.getValues(T[] a)
Deprecated.
this method will be moved to each Subject class individually in the next release
|
T[] |
AsyncSubject.getValues(T[] a)
Deprecated.
|
T[] |
BehaviorSubject.getValues(T[] a)
|
T[] |
SerializedSubject.getValues(T[] a)
Deprecated.
this method is scheduled to be removed in the next release
|
T[] |
PublishSubject.getValues(T[] a)
Deprecated.
this method is scheduled to be removed in the next release
|
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.
|
boolean |
ReplaySubject.hasAnyValue()
|
boolean |
Subject.hasCompleted()
Deprecated.
this method will be moved to each Subject class individually in the next release
|
boolean |
AsyncSubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
BehaviorSubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
SerializedSubject.hasCompleted()
Deprecated.
this method is scheduled to be removed in the next release
|
boolean |
PublishSubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
ReplaySubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
Subject.hasThrowable()
Deprecated.
this method will be moved to each Subject class individually in the next release
|
boolean |
AsyncSubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
BehaviorSubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
SerializedSubject.hasThrowable()
Deprecated.
this method is scheduled to be removed in the next release
|
boolean |
PublishSubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
ReplaySubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
Subject.hasValue()
Deprecated.
this method will be moved to each Subject class individually in the next release
|
boolean |
AsyncSubject.hasValue()
Check if the Subject has a value.
|
boolean |
BehaviorSubject.hasValue()
Check if the Subject has a value.
|
boolean |
SerializedSubject.hasValue()
Deprecated.
this method is scheduled to be removed in the next release
|
boolean |
PublishSubject.hasValue()
Deprecated.
this method is scheduled to be removed in the next release
|
boolean |
ReplaySubject.hasValue()
|
int |
ReplaySubject.size()
Returns the current number of items (non-terminal events) available for replay.
|
| Modifier and Type | Method and Description |
|---|---|
static Subscription |
Subscriptions.unsubscribed()
Returns a
Subscription to which
unsubscribe does nothing, as it is already unsubscribed.
|