| Package | Description |
|---|---|
| rx |
Rx Observables
|
| rx.observables | |
| rx.observers |
| Modifier and Type | Method and Description |
|---|---|
Subscription |
Observable.subscribe(Subscriber<? super T> subscriber)
Subscribes to an Observable and provides a Subscriber that implements functions to handle the items the
Observable emits and any error or completion notification it issues.
|
Subscription |
Single.subscribe(Subscriber<? super T> subscriber)
Subscribes to a Single and provides a Subscriber that implements functions to handle the item the Single
emits or any error notification it issues.
|
Subscription |
Observable.unsafeSubscribe(Subscriber<? super T> subscriber)
Subscribes to an Observable and invokes
Observable.OnSubscribe function without any contract protection,
error handling, unsubscribe, or execution hooks. |
void |
Single.unsafeSubscribe(Subscriber<? super T> subscriber)
Subscribes to a Single and invokes the
Single.OnSubscribe function without any contract protection,
error handling, unsubscribe, or execution hooks. |
| Constructor and Description |
|---|
Subscriber(Subscriber<?> subscriber)
Construct a Subscriber by using another Subscriber for backpressure and
for holding the subscription list (when
this.add(sub) is
called this will in fact call subscriber.add(sub)). |
Subscriber(Subscriber<?> subscriber,
boolean shareSubscriptions)
Construct a Subscriber by using another Subscriber for backpressure and
optionally for holding the subscription list (if
shareSubscriptions is true then when
this.add(sub) is called this will in fact call
subscriber.add(sub)). |
| Modifier and Type | Method and Description |
|---|---|
void |
AbstractOnSubscribe.call(Subscriber<? super T> subscriber) |
protected S |
AbstractOnSubscribe.onSubscribe(Subscriber<? super T> subscriber)
Called when a Subscriber subscribes and lets the implementor create a per-subscriber custom state.
|
| Modifier and Type | Method and Description |
|---|---|
static <T,S> AbstractOnSubscribe<T,S> |
AbstractOnSubscribe.create(Action1<AbstractOnSubscribe.SubscriptionState<T,S>> next,
Func1<? super Subscriber<? super T>,? extends S> onSubscribe)
Creates an
AbstractOnSubscribe instance which creates a custom state with the onSubscribe
function and calls the provided next action. |
static <T,S> AbstractOnSubscribe<T,S> |
AbstractOnSubscribe.create(Action1<AbstractOnSubscribe.SubscriptionState<T,S>> next,
Func1<? super Subscriber<? super T>,? extends S> onSubscribe,
Action1<? super S> onTerminated)
Creates an
AbstractOnSubscribe instance which creates a custom state with the onSubscribe
function, calls the provided next action and calls the onTerminated action to release the
state when its no longer needed. |
| Modifier and Type | Class and Description |
|---|---|
class |
SafeSubscriber<T>
SafeSubscriber is a wrapper around Subscriber that ensures that the Subscriber
complies with the Rx contract. |
class |
SerializedSubscriber<T>
Enforces single-threaded, serialized, ordered execution of
SerializedSubscriber.onNext(T), SerializedSubscriber.onCompleted(), and
SerializedSubscriber.onError(java.lang.Throwable). |
class |
TestSubscriber<T>
A
TestSubscriber is a variety of Subscriber that you can use for unit testing, to perform
assertions, inspect received events, or wrap a mocked Subscriber. |
| Modifier and Type | Method and Description |
|---|---|
static <T> Subscriber<T> |
Subscribers.create(Action1<? super T> onNext)
Creates a
Subscriber that receives the emissions of any Observable it subscribes to via
onNext but ignores onError and
onCompleted notifications. |
static <T> Subscriber<T> |
Subscribers.create(Action1<? super T> onNext,
Action1<Throwable> onError)
Creates an
Subscriber that receives the emissions of any Observable it subscribes to via
onNext and handles any onError notification but
ignores an onCompleted notification. |
static <T> Subscriber<T> |
Subscribers.create(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onComplete)
Creates an
Subscriber that receives the emissions of any Observable it subscribes to via
onNext and handles any onError or
onCompleted notifications. |
static <T> Subscriber<T> |
Subscribers.empty()
Returns an inert
Subscriber that does nothing in response to the emissions or notifications from
any Observable it subscribes to. |
static <T> Subscriber<T> |
Subscribers.from(Observer<? super T> o)
Converts an
Observer into a Subscriber. |
Subscriber<? super T> |
SafeSubscriber.getActual()
Returns the
Subscriber underlying this SafeSubscriber. |
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 add(rx.Subscription) is
called. |
| Modifier and Type | Method and Description |
|---|---|
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 add(rx.Subscription) is
called. |
| Constructor and Description |
|---|
SafeSubscriber(Subscriber<? super T> actual) |
SerializedSubscriber(Subscriber<? super T> s) |
SerializedSubscriber(Subscriber<? super T> s,
boolean shareSubscriptions)
Constructor for wrapping and serializing a subscriber optionally sharing the same underlying subscription
list.
|
TestSubscriber(Subscriber<T> delegate) |
Copyright © 2016. All rights reserved.