Package | Description |
---|---|
rx |
Rx Observables
|
rx.observers | |
rx.subjects |
Modifier and Type | Class and Description |
---|---|
class |
Subscriber<T>
Provides a mechanism for receiving push-based notifications from Observables, and permits manual
unsubscribing from these Observables.
|
Modifier and Type | Method and Description |
---|---|
void |
Notification.accept(Observer<? super T> observer)
Forwards this notification on to a specified
Observer . |
Observable<T> |
Observable.doOnEach(Observer<? super T> observer)
Modifies the source Observable so that it notifies an Observer for each item it emits.
|
Subscription |
Observable.subscribe(Observer<? super T> observer)
Subscribes to an Observable and provides an Observer that implements functions to handle the items the
Observable emits and any error or completion notification it issues.
|
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 |
SerializedObserver<T>
Enforces single-threaded, serialized, ordered execution of
SerializedObserver.onNext(T) , SerializedObserver.onCompleted() , and
SerializedObserver.onError(java.lang.Throwable) . |
class |
SerializedSubscriber<T>
Enforces single-threaded, serialized, ordered execution of
SerializedSubscriber.onNext(T) , SerializedSubscriber.onCompleted() , and
SerializedSubscriber.onError(java.lang.Throwable) . |
class |
TestObserver<T>
Observer usable for unit testing to perform assertions, inspect received events or wrap a mocked Observer.
|
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> Observer<T> |
Observers.create(Action1<? super T> onNext)
Creates an
Observer that receives the emissions of any Observable it subscribes to via
onNext but ignores onCompleted notifications;
it will throw an OnErrorNotImplementedException if onError is invoked. |
static <T> Observer<T> |
Observers.create(Action1<? super T> onNext,
Action1<Throwable> onError)
Creates an
Observer that receives the emissions of any Observable it subscribes to via
onNext and handles any onError notification but ignores
an onCompleted notification. |
static <T> Observer<T> |
Observers.create(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onComplete)
Creates an
Observer that receives the emissions of any Observable it subscribes to via
onNext and handles any onError or
onCompleted notifications. |
static <T> Observer<T> |
Observers.empty()
|
Modifier and Type | Method and Description |
---|---|
static <T> TestSubscriber<T> |
TestSubscriber.create(Observer<T> delegate) |
static <T> TestSubscriber<T> |
TestSubscriber.create(Observer<T> delegate,
long initialRequest) |
static <T> Subscriber<T> |
Subscribers.from(Observer<? super T> o)
Converts an
Observer into a Subscriber . |
Constructor and Description |
---|
SerializedObserver(Observer<? super T> s) |
TestObserver(Observer<T> delegate) |
TestSubscriber(Observer<T> delegate) |
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 | Class and Description |
---|---|
class |
AsyncSubject<T>
Subject that publishes only the last item observed to each
Observer that has subscribed, when the
source Observable completes. |
class |
BehaviorSubject<T>
Subject that emits the most recent item it has observed and all subsequent observed items to each subscribed
Observer . |
class |
PublishSubject<T>
Subject that, once an
Observer has subscribed, emits all subsequently observed items to the
subscriber. |
class |
ReplaySubject<T>
Subject that buffers all items it observes and replays them to any
Observer that subscribes. |
class |
SerializedSubject<T,R>
Wraps a
Subject so that it is safe to call its various on methods from different threads. |
class |
Subject<T,R>
Represents an object that is both an Observable and an Observer.
|
class |
TestSubject<T>
A variety of Subject that is useful for testing purposes.
|
Copyright © 2015. All Rights Reserved.