Package | Description |
---|---|
rx |
Rx Observables
|
rx.annotations | |
rx.exceptions | |
rx.observables | |
rx.observers | |
rx.plugins | |
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<T> |
Observable.merge(Observable<? extends Observable<? extends T>> source,
int maxConcurrent)
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<T> |
Observable.merge(Observable<? extends T>[] sequences,
int maxConcurrent)
Flattens an Array of Observables into one Observable, without any transformation, while limiting the
number of concurrent subscriptions to these Observables.
|
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.onBackpressureBlock()
Deprecated.
The operator doesn't work properly with
Observable.subscribeOn(Scheduler) and is prone to
deadlocks. It will be removed/unavailable starting from 1.1. |
Observable<T> |
Observable.onBackpressureBlock(int maxQueueLength)
Deprecated.
The operator doesn't work properly with
Observable.subscribeOn(Scheduler) and is prone to
deadlocks. It will be removed/unavailable starting from 1.1. |
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.
|
Observable<T> |
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<T> |
Observable.switchIfEmpty(Observable<? extends T> alternate)
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<T> |
Observable.takeUntil(Func1<? super T,Boolean> stopPredicate)
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.
|
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.
|
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. |
<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. |
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<? extends Throwable> exceptions)
Throws a single or multiple exceptions contained in the collection, wrapping it into
CompositeException if necessary. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractOnSubscribe<T,S>
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. |
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.
|
Modifier and Type | Method and Description |
---|---|
void |
TestSubscriber.assertCompleted()
Asserts that there is exactly one completion event.
|
void |
TestSubscriber.assertError(Class<? extends Throwable> clazz)
Asserts that there is exactly one error event which is a subclass of the given class.
|
void |
TestSubscriber.assertError(Throwable 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<T> |
TestSubscriber.create() |
static <T> TestSubscriber<T> |
TestSubscriber.create(long initialRequest) |
static <T> TestSubscriber<T> |
TestSubscriber.create(Observer<T> delegate) |
static <T> TestSubscriber<T> |
TestSubscriber.create(Observer<T> delegate,
long initialRequest) |
static <T> TestSubscriber<T> |
TestSubscriber.create(Subscriber<T> delegate) |
static <T> Subscriber<T> |
Subscribers.wrap(Subscriber<? super T> 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.add(rx.Subscription) is
called. |
Constructor and Description |
---|
TestSubscriber(long initialRequest)
Constructs a TestSubscriber with the initial request to be requested from upstream.
|
TestSubscriber(Observer<T> delegate,
long initialRequest)
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 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 |
BehaviorSubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
SerializedSubject.getThrowable() |
Throwable |
AsyncSubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
PublishSubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
ReplaySubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
Subject.getThrowable()
Returns the Throwable that terminated the Subject.
|
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() |
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 |
PublishSubject.getValue() |
T |
Subject.getValue()
Returns the current or latest value of the Subject if there is such a value and
the subject hasn't terminated with an exception.
|
Object[] |
SerializedSubject.getValues() |
Object[] |
PublishSubject.getValues() |
Object[] |
Subject.getValues()
Returns a snapshot of the currently buffered non-terminal events.
|
T[] |
BehaviorSubject.getValues(T[] a) |
T[] |
SerializedSubject.getValues(T[] a) |
T[] |
AsyncSubject.getValues(T[] a) |
T[] |
PublishSubject.getValues(T[] a) |
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[] |
Subject.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 |
BehaviorSubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
SerializedSubject.hasCompleted() |
boolean |
AsyncSubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
PublishSubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
ReplaySubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
Subject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
BehaviorSubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
SerializedSubject.hasThrowable() |
boolean |
AsyncSubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
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.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
BehaviorSubject.hasValue()
Check if the Subject has a value.
|
boolean |
SerializedSubject.hasValue() |
boolean |
AsyncSubject.hasValue()
Check if the Subject has a value.
|
boolean |
PublishSubject.hasValue() |
boolean |
ReplaySubject.hasValue() |
boolean |
Subject.hasValue()
Check if the Subject has any value.
|
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. |
Copyright © 2015. All Rights Reserved.