Uses of Interface
rx.Observer
Packages that use Observer
Package
Description
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
Exception handling utilities, safe subscriber exception classes,
lifecycle exception classes.
Operators that allow composing Observables to transform and
manipulate data in an asynchronous, functional and thread-safe manner.
Classes extending the Observable base reactive class, synchronous and
asynchronous event generators.
Default wrappers and implementations for the base reactive consumer classes and interfaces;
utility classes for creating them from callbacks.
Classes extending the Observable base reactive class and implementing
the Observer interface at the same time (aka hot Observables).
-
Uses of Observer in rx
Modifier and TypeInterfaceDescriptioninterface
AsyncEmitter<T>
Abstraction over a RxJava Subscriber that allows associating a resource with it and exposes the current number of downstream requested amount.Modifier and TypeClassDescriptionclass
Subscriber<T>
Provides a mechanism for receiving push-based notifications from Observables, and permits manual unsubscribing from these Observables.Modifier and TypeMethodDescriptionvoid
Forwards this notification on to a specifiedObserver
.final Observable
<T> Modifies the source Observable so that it notifies an Observer for each item and terminal event it emits.final Subscription
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.final Subscription
Subscribes an Observer to this single and returns a Subscription that allows unsubscription. -
Uses of Observer in rx.exceptions
Methods in rx.exceptions with parameters of type ObserverModifier and TypeMethodDescriptionstatic void
Exceptions.throwOrReport
(Throwable t, Observer<?> o) Forwards a fatal exception or reports it to the given Observer.static void
Exceptions.throwOrReport
(Throwable t, Observer<?> o, Object value) Forwards a fatal exception or reports it along with the value caused it to the given Observer. -
Uses of Observer in rx.internal.operators
Classes in rx.internal.operators that implement ObserverModifier and TypeClassDescription(package private) static final class
Observer of source, iterator for output.(package private) static final class
(package private) static final class
static final class
final class
A solution to the "time gap" problem that occurs withgroupBy
andpivot
.(package private) static final class
Contains the active child producers and the values to replay.(package private) static final class
(package private) static final class
class
Base class for Subscribers that consume the entire upstream and signal zero or one element (or an error) in a backpressure honoring fashion.(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
The parent subscriber that forwards events and cleans up on a terminal state.(package private) static final class
(package private) static final class
(package private) static class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static class
(package private) final class
Observe left duration and apply termination.(package private) final class
Observe the left source.(package private) final class
Observe right duration and apply termination.(package private) final class
Observe the right source.(package private) final class
Observe activities on the window.(package private) final class
Observes the left values.(package private) final class
Observes the left duration.(package private) final class
Observes the right values.(package private) final class
Observe the right duration.(package private) static final class
(package private) static final class
final class
Multicasts notifications coming through its input Subscriber view to its client Subscribers via lockstep backpressure mode.(package private) static final class
The subscriber that must be used for subscribing to the upstream source.(package private) static final class
(package private) static final class
(package private) static final class
(package private) final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) final class
(package private) final class
Subscriber when exact timed chunking is required.(package private) final class
Subscriber when the buffer chunking time and length differ.(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
static final class
(package private) static final class
(package private) static final class
(package private) static class
(package private) static final class
(package private) static final class
The subscriber that observes Observables.(package private) static final class
Observe through individual queue per observer.(package private) static final class
(package private) static final class
A terminable producer which emits the latest items on request.(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
The source subscriber and sampler.(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
Subscribed to source and scheduled on a worker.(package private) final class
Subscriber returned to the upstream.(package private) static final class
(package private) static final class
Observes the boundary.(package private) static final class
Observes the source.(package private) static final class
Observes the boundary.(package private) static final class
Observes the source.(package private) static final class
(package private) static final class
(package private) static final class
(package private) final class
(package private) final class
Subscriber with exact, non-overlapping windows.(package private) final class
Subscriber with inexact, potentially overlapping or discontinuous windows.(package private) static final class
(package private) static final class
(package private) final class
(package private) final class
Fields in rx.internal.operators declared as ObserverModifier and TypeFieldDescriptionOperatorZip.Zip.child
OperatorWindowWithObservable.SourceSubscriber.consumer
Accessed from the serialized part.OperatorWindowWithObservableFactory.SourceSubscriber.consumer
Accessed from the serialized part.OperatorWindowWithStartEndObservable.SerializedSubject.consumer
OperatorWindowWithTime.CountedSerializedSubject.consumer
OperatorWindowWithTime.State.consumer
OperatorDoOnEach.doOnEachObserver
(package private) static final Observer
BufferUntilSubscriber.EMPTY_OBSERVER
Fields in rx.internal.operators with type parameters of type ObserverMethods in rx.internal.operators with parameters of type ObserverModifier and TypeMethodDescriptionboolean
Unwraps the lite notification and calls the appropriate method on theObserver
.(package private) boolean
BufferUntilSubscriber.State.casObserverRef
(Observer<? super T> expected, Observer<? super T> next) OperatorWindowWithTime.State.create
(Observer<T> consumer, Observable<T> producer) Method parameters in rx.internal.operators with type arguments of type ObserverModifier and TypeMethodDescription(package private) void
Constructors in rx.internal.operators with parameters of type ObserverModifierConstructorDescriptionCountedSerializedSubject
(Observer<T> consumer, Observable<T> producer) OperatorDoOnEach
(Observer<? super T> doOnEachObserver) SerializedSubject
(Observer<T> consumer, Observable<T> producer) State
(Observer<T> consumer, Observable<T> producer, int count) -
Uses of Observer in rx.internal.producers
Classes in rx.internal.producers that implement ObserverModifier and TypeClassDescriptionfinal class
Producer that serializes any event emission with requesting and producer changes.final class
Producer that holds an unbounded (or custom) queue, handles terminal events, enqueues values and relays them to a child subscriber on request. -
Uses of Observer in rx.internal.schedulers
Fields in rx.internal.schedulers declared as ObserverModifier and TypeFieldDescriptionprivate final Observer
<Observable<Completable>> SchedulerWhen.workerObserver
-
Uses of Observer in rx.internal.util
Classes in rx.internal.util that implement ObserverModifier and TypeClassDescriptionfinal class
An Observer that forwards the onXXX method calls to a notification callback by transforming each signal type into Notifications.final class
A Subscriber that forwards the onXXX method calls to callbacks.final class
Wraps an Observer and forwards the onXXX method calls to it.Fields in rx.internal.util declared as ObserverMethods in rx.internal.util with parameters of type ObserverConstructors in rx.internal.util with parameters of type Observer -
Uses of Observer in rx.observables
Classes in rx.observables that implement ObserverModifier and TypeClassDescription(package private) static final class
(package private) static final class
(package private) static final class
Contains the producer loop that reacts to downstream requests of work.Fields in rx.observables with type parameters of type ObserverModifier and TypeFieldDescriptionAsyncOnSubscribe.AsyncOnSubscribeImpl.next
SyncOnSubscribe.SyncOnSubscribeImpl.next
Methods in rx.observables with parameters of type ObserverModifier and TypeMethodDescriptionprotected S
AsyncOnSubscribe.AsyncOnSubscribeImpl.next
(S state, long requested, Observer<Observable<? extends T>> observer) protected abstract S
AsyncOnSubscribe.next
(S state, long requested, Observer<Observable<? extends T>> observer) Called to produce data to the downstream subscribers.protected abstract S
Called to produce data to the downstream subscribers.protected S
void
Subscribes to the source and calls back the Observer methods on the current thread.Method parameters in rx.observables with type arguments of type ObserverModifier and TypeMethodDescriptionstatic <S,
T> AsyncOnSubscribe <S, T> AsyncOnSubscribe.createSingleState
(Func0<? extends S> generator, Action3<? super S, Long, ? super Observer<Observable<? extends T>>> next) Generates a synchronousAsyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,
T> AsyncOnSubscribe <S, T> AsyncOnSubscribe.createSingleState
(Func0<? extends S> generator, Action3<? super S, Long, ? super Observer<Observable<? extends T>>> next, Action1<? super S> onUnsubscribe) Generates a synchronousAsyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,
T> SyncOnSubscribe <S, T> SyncOnSubscribe.createSingleState
(Func0<? extends S> generator, Action2<? super S, ? super Observer<? super T>> next) Generates a synchronousSyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,
T> SyncOnSubscribe <S, T> SyncOnSubscribe.createSingleState
(Func0<? extends S> generator, Action2<? super S, ? super Observer<? super T>> next, Action1<? super S> onUnsubscribe) Generates a synchronousSyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,
T> AsyncOnSubscribe <S, T> AsyncOnSubscribe.createStateful
(Func0<? extends S> generator, Func3<? super S, Long, ? super Observer<Observable<? extends T>>, ? extends S> next) Generates a synchronousAsyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,
T> AsyncOnSubscribe <S, T> AsyncOnSubscribe.createStateful
(Func0<? extends S> generator, Func3<? super S, Long, ? super Observer<Observable<? extends T>>, ? extends S> next, Action1<? super S> onUnsubscribe) Generates a synchronousAsyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,
T> SyncOnSubscribe <S, T> SyncOnSubscribe.createStateful
(Func0<? extends S> generator, Func2<? super S, ? super Observer<? super T>, ? extends S> next) Generates a synchronousSyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <S,
T> SyncOnSubscribe <S, T> SyncOnSubscribe.createStateful
(Func0<? extends S> generator, Func2<? super S, ? super Observer<? super T>, ? extends S> next, Action1<? super S> onUnsubscribe) Generates a synchronousSyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <T> AsyncOnSubscribe
<Void, T> AsyncOnSubscribe.createStateless
(Action2<Long, ? super Observer<Observable<? extends T>>> next) Generates a synchronousAsyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <T> AsyncOnSubscribe
<Void, T> AsyncOnSubscribe.createStateless
(Action2<Long, ? super Observer<Observable<? extends T>>> next, Action0 onUnsubscribe) Generates a synchronousAsyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <T> SyncOnSubscribe
<Void, T> SyncOnSubscribe.createStateless
(Action1<? super Observer<? super T>> next) Generates a synchronousSyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.static <T> SyncOnSubscribe
<Void, T> SyncOnSubscribe.createStateless
(Action1<? super Observer<? super T>> next, Action0 onUnsubscribe) Generates a synchronousSyncOnSubscribe
that calls the providednext
function to generate data to downstream subscribers.Constructor parameters in rx.observables with type arguments of type ObserverModifierConstructorDescriptionAsyncOnSubscribeImpl
(Func0<? extends S> generator, Func3<? super S, Long, ? super Observer<Observable<? extends T>>, ? extends S> next) (package private)
AsyncOnSubscribeImpl
(Func0<? extends S> generator, Func3<? super S, Long, ? super Observer<Observable<? extends T>>, ? extends S> next, Action1<? super S> onUnsubscribe) AsyncOnSubscribeImpl
(Func3<S, Long, Observer<Observable<? extends T>>, S> nextFunc) AsyncOnSubscribeImpl
(Func3<S, Long, Observer<Observable<? extends T>>, S> next, Action1<? super S> onUnsubscribe) SyncOnSubscribeImpl
(Func0<? extends S> generator, Func2<? super S, ? super Observer<? super T>, ? extends S> next) (package private)
SyncOnSubscribeImpl
(Func0<? extends S> generator, Func2<? super S, ? super Observer<? super T>, ? extends S> next, Action1<? super S> onUnsubscribe) -
Uses of Observer in rx.observers
Classes in rx.observers that implement ObserverModifier and TypeClassDescriptionclass
SafeSubscriber
is a wrapper aroundSubscriber
that ensures that theSubscriber
complies with the Observable contract.class
Enforces single-threaded, serialized, ordered execution ofSerializedObserver.onNext(T)
,SerializedObserver.onCompleted()
, andSerializedObserver.onError(java.lang.Throwable)
.class
Enforces single-threaded, serialized, ordered execution ofSerializedSubscriber.onNext(T)
,SerializedSubscriber.onCompleted()
, andSerializedSubscriber.onError(java.lang.Throwable)
.class
TestObserver<T>
Deprecated.class
ATestSubscriber
is a variety ofSubscriber
that you can use for unit testing, to perform assertions, inspect received events, or wrap a mockedSubscriber
.Fields in rx.observers declared as ObserverModifier and TypeFieldDescriptionSerializedObserver.actual
TestObserver.delegate
Deprecated.TestSubscriber.delegate
Observers.EMPTY
TestObserver.INERT
Deprecated.TestSubscriber.INERT
The shared no-op observer.SerializedSubscriber.s
Methods in rx.observers that return ObserverModifier and TypeMethodDescriptionstatic <T> Observer
<T> Creates anObserver
that receives the emissions of anyObservable
it subscribes to viaonNext
but ignoresonCompleted
notifications; it will throw anOnErrorNotImplementedException
ifonError
is invoked.static <T> Observer
<T> Creates anObserver
that receives the emissions of anyObservable
it subscribes to viaonNext
and handles anyonError
notification but ignores anonCompleted
notification.static <T> Observer
<T> Creates anObserver
that receives the emissions of anyObservable
it subscribes to viaonNext
and handles anyonError
oronCompleted
notifications.static <T> Observer
<T> Observers.empty()
Methods in rx.observers with parameters of type ObserverModifier and TypeMethodDescriptionstatic <T> TestSubscriber
<T> Factory method to construct a TestSubscriber which delegates events to the given Observer and an issues an initial request of Long.MAX_VALUE.static <T> TestSubscriber
<T> Factory method to construct a TestSubscriber which delegates events to the given Observer and issues the given initial request amount.static <T> Subscriber
<T> Converts anObserver
into aSubscriber
.Constructors in rx.observers with parameters of type ObserverModifierConstructorDescriptionSerializedObserver
(Observer<? super T> s) TestObserver
(Observer<T> delegate) Deprecated.TestSubscriber
(Observer<T> delegate) Constructs a TestSubscriber which requests Long.MAX_VALUE and delegates events to the given Observer.TestSubscriber
(Observer<T> delegate, long initialRequest) Constructs a TestSubscriber with the initial request to be requested from upstream and a delegate Observer to wrap. -
Uses of Observer in rx.subjects
Classes in rx.subjects that implement ObserverModifier and TypeClassDescriptionfinal class
AsyncSubject<T>
Subject that publishes only the last item observed to eachObserver
once the sourceObservable
has completed.final class
Subject that emits the most recent item it has observed and all subsequent observed items to each subscribedObserver
.final class
Subject that, once anObserver
has subscribed, emits all subsequently observed items to the subscriber.final class
Subject that buffers all items it observes and replays them to anyObserver
that subscribes.(package private) static final class
Holds onto the array of Subscriber-wrapping ReplayProducers and the buffer that holds values to be replayed; it manages subscription and signal dispatching.class
SerializedSubject<T,
R> Wraps aSubject
so that it is safe to call its variouson
methods from different threads.class
Subject<T,
R> Represents an object that is both an Observable and an Observer.protected static final class
Observer wrapping the actual Subscriber and providing various emission facilities.final class
TestSubject<T>
A variety of Subject that is useful for testing purposes.final class
A Subject variant which buffers events until a single Subscriber arrives and replays them to it and potentially switches to direct delivery once the Subscriber caught up and requested an unlimited amount.(package private) static final class
The single-consumption replaying state.Methods in rx.subjects that return Observer
TestSubscriber
insteand.