Package | Description |
---|---|
rx |
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
|
rx.functions |
Functional interfaces of functions and actions of arity 0 to 9 and related
utility classes.
|
rx.observables |
Classes extending the Observable base reactive class, synchronous and
asynchronous event generators.
|
rx.observers |
Default wrappers and implementations for the base reactive consumer classes and interfaces;
utility classes for creating them from callbacks.
|
rx.plugins |
Callback types and a central plugin handler class to hook into the lifecycle
of the base reactive types and schedulers.
|
rx.subjects |
Classes extending the Observable base reactive class and implementing
the Observer interface at the same time (aka hot Observables).
|
rx.subscriptions |
Default implementations for Subscription-based resource management
(Subscription container types) and utility classes to construct
Subscriptions from callbacks and other types.
|
Modifier and Type | Method and Description |
---|---|
Completable |
Completable.doAfterTerminate(Action0 onAfterComplete)
Returns a Completable instance that calls the given onAfterComplete callback after this
Completable completes normally.
|
Single<T> |
Single.doAfterTerminate(Action0 action)
Registers an
Action0 to be called when this Single invokes either
SingleSubscriber.onSuccess(Object) onSuccess} or onError . |
Observable<T> |
Observable.doAfterTerminate(Action0 action)
|
Completable |
Completable.doOnComplete(Action0 onComplete)
Deprecated.
Use
Completable.doOnCompleted(Action0) instead. |
Completable |
Completable.doOnCompleted(Action0 onCompleted)
Returns a Completable which calls the given onCompleted callback if this Completable completes.
|
Observable<T> |
Observable.doOnCompleted(Action0 onCompleted)
Modifies the source Observable so that it invokes an action when it calls
onCompleted . |
protected Completable |
Completable.doOnLifecycle(Action1<? super Subscription> onSubscribe,
Action1<? super Throwable> onError,
Action0 onComplete,
Action0 onAfterComplete,
Action0 onUnsubscribe)
Returns a Completable instance that calls the various callbacks on the specific
lifecycle events.
|
Single<T> |
Single.doOnSubscribe(Action0 subscribe)
Modifies the source
Single so that it invokes the given action when it is subscribed from
its subscribers. |
Observable<T> |
Observable.doOnSubscribe(Action0 subscribe)
Modifies the source
Observable so that it invokes the given action when it is subscribed from
its subscribers. |
Completable |
Completable.doOnTerminate(Action0 onTerminate)
Returns a Completable instance that calls the given onTerminate callback just before this Completable
completes normally or with an exception
|
Observable<T> |
Observable.doOnTerminate(Action0 onTerminate)
Modifies the source Observable so that it invokes an action when it calls
onCompleted or
onError . |
Completable |
Completable.doOnUnsubscribe(Action0 onUnsubscribe)
Returns a Completable which calls the given onUnsubscribe callback if the child subscriber cancels
the subscription.
|
Single<T> |
Single.doOnUnsubscribe(Action0 action)
Modifies the source
Single so that it invokes the given action when it is unsubscribed from
its subscribers. |
Observable<T> |
Observable.doOnUnsubscribe(Action0 unsubscribe)
Calls the unsubscribe
Action0 if the downstream unsubscribes the sequence. |
Observable<T> |
Observable.finallyDo(Action0 action)
Deprecated.
use
Observable.doAfterTerminate(Action0) instead. |
void |
Observable.forEach(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onComplete)
Subscribes to the
Observable and receives notifications for each element and the terminal events. |
static Completable |
Completable.fromAction(Action0 action)
Returns a Completable instance that runs the given Action0 for each subscriber and
emits either an unchecked exception or simply completes.
|
Observable<T> |
Observable.onBackpressureBuffer(long capacity,
Action0 onOverflow)
Instructs an Observable that is emitting items faster than its observer can consume them to buffer up to
a given amount of items until they can be emitted.
|
Observable<T> |
Observable.onBackpressureBuffer(long capacity,
Action0 onOverflow,
BackpressureOverflow.Strategy overflowStrategy)
Instructs an Observable that is emitting items faster than its observer can consume them to buffer up to
a given amount of items until they can be emitted.
|
abstract Subscription |
Scheduler.Worker.schedule(Action0 action)
Schedules an Action for execution.
|
abstract Subscription |
Scheduler.Worker.schedule(Action0 action,
long delayTime,
TimeUnit unit)
Schedules an Action for execution at some point in the future.
|
Subscription |
Scheduler.Worker.schedulePeriodically(Action0 action,
long initialDelay,
long period,
TimeUnit unit)
Schedules a cancelable action to be executed periodically.
|
Subscription |
Completable.subscribe(Action0 onComplete)
Subscribes to this Completable and calls the given Action0 when this Completable
completes normally.
|
Subscription |
Completable.subscribe(Action0 onComplete,
Action1<? super Throwable> onError)
Subscribes to this Completable and calls back either the onError or onComplete functions.
|
Subscription |
Observable.subscribe(Action1<? super T> onNext,
Action1<Throwable> onError,
Action0 onCompleted)
Subscribes to an Observable and provides callbacks to handle the items it emits and any error or
completion notification it issues.
|
Modifier and Type | Method and Description |
---|---|
static FuncN<Void> |
Functions.fromAction(Action0 f)
|
static <T> Action1<T> |
Actions.toAction1(Action0 action)
Wraps an Action0 instance into an Action1 instance where the latter calls
the former.
|
static Func0<Void> |
Actions.toFunc(Action0 action)
Converts an
Action0 to a function that calls the action and returns null . |
static <R> Func0<R> |
Actions.toFunc(Action0 action,
R result)
Converts an
Action0 to a function that calls the action and returns a specified value. |
Modifier and Type | Method and Description |
---|---|
static <T> SyncOnSubscribe<Void,T> |
SyncOnSubscribe.createStateless(Action1<? super Observer<? super T>> next,
Action0 onUnsubscribe)
Generates a synchronous
SyncOnSubscribe that calls the provided next 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 synchronous
AsyncOnSubscribe that calls the provided next
function to generate data to downstream subscribers. |
void |
BlockingObservable.subscribe(Action1<? super T> onNext,
Action1<? super Throwable> onError,
Action0 onCompleted)
Subscribes to the source and calls the given actions on the current thread.
|
Modifier and Type | Method and Description |
---|---|
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> 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. |
Modifier and Type | Method and Description |
---|---|
Action0 |
RxJavaSchedulersHook.onSchedule(Action0 action)
Deprecated.
|
static Action0 |
RxJavaHooks.onScheduledAction(Action0 action)
Hook to call before the action is scheduled, allows
decorating the original action.
|
Modifier and Type | Method and Description |
---|---|
static Func1<Action0,Action0> |
RxJavaHooks.getOnScheduleAction()
Returns the current schedule action hook function or null if it is
set to the default pass-through.
|
static Func1<Action0,Action0> |
RxJavaHooks.getOnScheduleAction()
Returns the current schedule action hook function or null if it is
set to the default pass-through.
|
Modifier and Type | Method and Description |
---|---|
Action0 |
RxJavaSchedulersHook.onSchedule(Action0 action)
Deprecated.
|
static Action0 |
RxJavaHooks.onScheduledAction(Action0 action)
Hook to call before the action is scheduled, allows
decorating the original action.
|
Modifier and Type | Method and Description |
---|---|
static void |
RxJavaHooks.setOnScheduleAction(Func1<Action0,Action0> onScheduleAction)
Sets the hook function that is called before an action is scheduled, allowing
decorating that function, unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnScheduleAction(Func1<Action0,Action0> onScheduleAction)
Sets the hook function that is called before an action is scheduled, allowing
decorating that function, unless a lockdown is in effect.
|
Modifier and Type | Method and Description |
---|---|
static <T> UnicastSubject<T> |
UnicastSubject.create(int capacityHint,
Action0 onTerminated)
Constructs an empty UnicastSubject instance with a capacity hint and
an Action0 instance to call if the subject reaches its terminal state
or the single Subscriber unsubscribes mid-sequence.
|
Modifier and Type | Method and Description |
---|---|
static Subscription |
Subscriptions.create(Action0 unsubscribe)
Creates and returns a
Subscription that invokes the given Action0 when unsubscribed. |
static BooleanSubscription |
BooleanSubscription.create(Action0 onUnsubscribe)
Creates a
BooleanSubscription with a specified function to invoke upon unsubscribe. |
Copyright © 2017. All rights reserved.