Package | Description |
---|---|
rx |
Rx Observables
|
rx.annotations | |
rx.exceptions | |
rx.observables | |
rx.observers | |
rx.plugins | |
rx.subjects | |
rx.subscriptions |
Modifier and Type | Method and Description |
---|---|
Observable<T> |
Observable.onBackpressureBlock()
Instructs an Observable that is emitting items faster than its observer can consume them to block the
producer thread if the number of undelivered onNext events reaches the system-wide ring buffer size.
|
Observable<T> |
Observable.onBackpressureBlock(int maxQueueLength)
Instructs an Observable that is emitting items faster than its observer can consume them to
block the producer thread.
|
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.
|
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 |
---|---|
void |
TestSubscriber.assertCompleted()
Assert if there is exactly a single completion event.
|
void |
TestSubscriber.assertError(Class<? extends Throwable> clazz)
Assert if there is exactly one error event which is a subclass of the given class.
|
void |
TestSubscriber.assertError(Throwable throwable)
Assert there is a single onError event with the exact exception.
|
void |
TestSubscriber.assertNotCompleted()
Assert if there is no completion event.
|
void |
TestSubscriber.assertNoTerminalEvent()
Assert for no onError and onCompleted events.
|
void |
TestSubscriber.assertNoValues()
Assert if there are no onNext events received.
|
void |
TestSubscriber.assertValue(T value)
Assert if there is only a single received onNext event.
|
void |
TestSubscriber.assertValueCount(int count)
Assert if the given number of onNext events are received.
|
void |
TestSubscriber.assertValues(T... values)
Assert if the received onNext events, in order, are the specified values.
|
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 |
AsyncSubject.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 |
SerializedSubject.getThrowable() |
Throwable |
ReplaySubject.getThrowable()
Returns the Throwable that terminated the Subject.
|
Throwable |
Subject.getThrowable()
Returns the Throwable that terminated the Subject.
|
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 |
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 |
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[] |
PublishSubject.getValues() |
Object[] |
SerializedSubject.getValues() |
Object[] |
Subject.getValues()
Returns a snapshot of the currently buffered non-terminal events.
|
T[] |
AsyncSubject.getValues(T[] a) |
T[] |
PublishSubject.getValues(T[] a) |
T[] |
BehaviorSubject.getValues(T[] a) |
T[] |
SerializedSubject.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 |
AsyncSubject.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 |
SerializedSubject.hasCompleted() |
boolean |
ReplaySubject.hasCompleted()
Check if the Subject has terminated normally.
|
boolean |
Subject.hasCompleted()
Check if the Subject has terminated normally.
|
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 |
BehaviorSubject.hasThrowable()
Check if the Subject has terminated with an exception.
|
boolean |
SerializedSubject.hasThrowable() |
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 |
AsyncSubject.hasValue()
Check if the Subject has a value.
|
boolean |
PublishSubject.hasValue() |
boolean |
BehaviorSubject.hasValue()
Check if the Subject has a value.
|
boolean |
SerializedSubject.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.