Uses of Interface
rx.functions.Action0
Packages that use Action0
Package
Description
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
Functional interfaces of functions and actions of arity 0 to 9 and related
utility 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.
Callback types and a central plugin handler class to hook into the lifecycle
of the base reactive types and schedulers.
Scheduler implementations, value+time record classes and the standard factory class to
return standard RxJava schedulers or wrap any Executor-based (thread pool) instances.
Classes extending the Observable base reactive class and implementing
the Observer interface at the same time (aka hot Observables).
Default implementations for Subscription-based resource management
(Subscription container types) and utility classes to construct
Subscriptions from callbacks and other types.
-
Uses of Action0 in rx
Modifier and TypeMethodDescriptionfinal Completable
Completable.doAfterTerminate
(Action0 onAfterComplete) Returns a Completable instance that calls the given onAfterComplete callback after this Completable completes normally.final Observable
<T> Observable.doAfterTerminate
(Action0 action) Single.doAfterTerminate
(Action0 action) Registers anAction0
to be called when thisSingle
invokes eitherSingleSubscriber.onSuccess(Object)
onSuccess} oronError
.final Completable
Completable.doOnComplete
(Action0 onComplete) Deprecated.final Completable
Completable.doOnCompleted
(Action0 onCompleted) Returns a Completable which calls the given onCompleted callback if this Completable completes.final Observable
<T> Observable.doOnCompleted
(Action0 onCompleted) Modifies the source Observable so that it invokes an action when it callsonCompleted
.protected final 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.final Observable
<T> Observable.doOnSubscribe
(Action0 subscribe) Modifies the sourceObservable
so that it invokes the given action when it is subscribed from its subscribers.Single.doOnSubscribe
(Action0 subscribe) Modifies the sourceSingle
so that it invokes the given action when it is subscribed from its subscribers.final Completable
Completable.doOnTerminate
(Action0 onTerminate) Returns a Completable instance that calls the given onTerminate callback just before this Completable completes normally or with an exceptionfinal Observable
<T> Observable.doOnTerminate
(Action0 onTerminate) Modifies the source Observable so that it invokes an action when it callsonCompleted
oronError
.final Completable
Completable.doOnUnsubscribe
(Action0 onUnsubscribe) Returns a Completable which calls the given onUnsubscribe callback if the child subscriber cancels the subscription.final Observable
<T> Observable.doOnUnsubscribe
(Action0 unsubscribe) Calls the unsubscribeAction0
if the downstream unsubscribes the sequence.Single.doOnUnsubscribe
(Action0 action) Modifies the sourceSingle
so that it invokes the given action when it is unsubscribed from its subscribers.final Observable
<T> Deprecated.useObservable.doAfterTerminate(Action0)
instead.final void
Subscribes to theObservable
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.final 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.final 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
Schedules an Action for execution.abstract Subscription
Schedules an Action for execution at some point in the future.Scheduler.Worker.schedulePeriodically
(Action0 action, long initialDelay, long period, TimeUnit unit) Schedules a cancelable action to be executed periodically.final Subscription
Subscribes to this Completable and calls the given Action0 when this Completable completes normally.final Subscription
Subscribes to this Completable and calls back either the onError or onComplete functions.final Subscription
Subscribes to an Observable and provides callbacks to handle the items it emits and any error or completion notification it issues. -
Uses of Action0 in rx.functions
Classes in rx.functions that implement Action0Modifier and TypeClassDescription(package private) static final class
Actions.EmptyAction<T0,
T1, T2, T3, T4, T5, T6, T7, T8> Fields in rx.functions declared as Action0Modifier and TypeFieldDescription(package private) final Action0
Actions.Action1CallsAction0.action
Methods in rx.functions with parameters of type Action0Modifier and TypeMethodDescriptionFunctions.fromAction
(Action0 f) static <T> Action1
<T> Wraps an Action0 instance into an Action1 instance where the latter calls the former.Converts anAction0
to a function that calls the action and returnsnull
.static <R> Func0
<R> Converts anAction0
to a function that calls the action and returns a specified value.Constructors in rx.functions with parameters of type Action0 -
Uses of Action0 in rx.internal.operators
Classes in rx.internal.operators that implement Action0Modifier and TypeClassDescription(package private) static final class
OnSubscribeUsing.DisposeAction<Resource>
(package private) static final class
Observe through individual queue per observer.(package private) static final class
The source subscriber and sampler.(package private) static final class
Subscribed to source and scheduled on a worker.(package private) static final class
(package private) static final class
(package private) static final class
Fields in rx.internal.operators declared as Action0Modifier and TypeFieldDescription(package private) final Action0
OperatorDoAfterTerminate.action
(package private) final Action0
SingleDoAfterTerminate.action
(package private) final Action0
SingleDoAfterTerminate.SingleDoAfterTerminateSubscriber.action
private final Action0
OperatorOnBackpressureBuffer.BufferSubscriber.onOverflow
private final Action0
OperatorOnBackpressureBuffer.onOverflow
private final Action0
OperatorDoOnSubscribe.subscribe
private final Action0
OperatorDoOnUnsubscribe.unsubscribe
Methods in rx.internal.operators with parameters of type Action0Constructors in rx.internal.operators with parameters of type Action0ModifierConstructorDescriptionBufferSubscriber
(Subscriber<? super T> child, Long capacity, Action0 onOverflow, BackpressureOverflow.Strategy overflowStrategy) OperatorDoAfterTerminate
(Action0 action) OperatorDoOnSubscribe
(Action0 subscribe) Constructs an instance of the operator with the callback that gets invoked when the modified Observable is subscribedOperatorDoOnUnsubscribe
(Action0 unsubscribe) Constructs an instance of the operator with the callback that gets invoked when the modified Observable is unsubscribedOperatorOnBackpressureBuffer
(long capacity, Action0 onOverflow) Construct a new instance that will handle overflows withON_OVERFLOW_DEFAULT
, providing the following behavior config:OperatorOnBackpressureBuffer
(long capacity, Action0 onOverflow, BackpressureOverflow.Strategy overflowStrategy) Construct a new instance feeding the following behavior config:SingleDoAfterTerminate
(Single<T> source, Action0 action) SingleDoAfterTerminateSubscriber
(SingleSubscriber<? super T> actual, Action0 action) -
Uses of Action0 in rx.internal.schedulers
Classes in rx.internal.schedulers that implement Action0Fields in rx.internal.schedulers declared as Action0Modifier and TypeFieldDescription(package private) final Action0
ScheduledAction.action
private final Action0
SchedulerWhen.DelayedAction.action
private final Action0
SchedulerWhen.ImmediateAction.action
(package private) final Action0
TrampolineScheduler.TimedAction.action
private final Action0
SleepingAction.underlying
Methods in rx.internal.schedulers with parameters of type Action0Modifier and TypeMethodDescriptionprivate Subscription
TrampolineScheduler.InnerCurrentThreadScheduler.schedule
(Action0 action, long delayTime, TimeUnit unit) NewThreadWorker.scheduleActual
(Action0 action, long delayTime, TimeUnit unit) Schedules the given action by wrapping it into a ScheduledAction on the underlying ExecutorService, returning the ScheduledAction.NewThreadWorker.scheduleActual
(Action0 action, long delayTime, TimeUnit unit, SubscriptionList parent) NewThreadWorker.scheduleActual
(Action0 action, long delayTime, TimeUnit unit, CompositeSubscription parent) EventLoopsScheduler.scheduleDirect
(Action0 action) Schedules the action directly on one of the event loop workers without the additional infrastructure and checking.Constructors in rx.internal.schedulers with parameters of type Action0ModifierConstructorDescriptionDelayedAction
(Action0 action, long delayTime, TimeUnit unit) ImmediateAction
(Action0 action) ScheduledAction
(Action0 action) ScheduledAction
(Action0 action, SubscriptionList parent) ScheduledAction
(Action0 action, CompositeSubscription parent) SleepingAction
(Action0 underlying, Scheduler.Worker scheduler, long execTime) (package private)
TimedAction
(Action0 action, Long execTime, int count) -
Uses of Action0 in rx.internal.util
Classes in rx.internal.util that implement Action0Modifier and TypeClassDescription(package private) static final class
Represents a producer which schedules the emission of a scalar value on the first positive request via the given scheduler callback.(package private) static final class
Action that emits a single value when called.Fields in rx.internal.util declared as Action0Fields in rx.internal.util with type parameters of type Action0Modifier and TypeFieldDescription(package private) final Func1
<Action0, Subscription> ScalarSynchronousObservable.ScalarAsyncOnSubscribe.onSchedule
(package private) final Func1
<Action0, Subscription> ScalarSynchronousObservable.ScalarAsyncProducer.onSchedule
Constructors in rx.internal.util with parameters of type Action0ModifierConstructorDescriptionConstructor parameters in rx.internal.util with type arguments of type Action0ModifierConstructorDescription(package private)
ScalarAsyncOnSubscribe
(T value, Func1<Action0, Subscription> onSchedule) ScalarAsyncProducer
(Subscriber<? super T> actual, T value, Func1<Action0, Subscription> onSchedule) -
Uses of Action0 in rx.observables
Methods in rx.observables with parameters of type Action0Modifier and TypeMethodDescriptionstatic <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, Action0 onUnsubscribe) Generates a synchronousSyncOnSubscribe
that calls the providednext
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. -
Uses of Action0 in rx.observers
Methods in rx.observers with parameters of type Action0Modifier and TypeMethodDescriptionstatic <T> Observer
<T> Creates anObserver
that receives the emissions of anyObservable
it subscribes to viaonNext
and handles anyonError
oronCompleted
notifications.static <T> Subscriber
<T> Creates anSubscriber
that receives the emissions of anyObservable
it subscribes to viaonNext
and handles anyonError
oronCompleted
notifications. -
Uses of Action0 in rx.plugins
Fields in rx.plugins with type parameters of type Action0Methods in rx.plugins that return Action0Modifier and TypeMethodDescriptionRxJavaSchedulersHook.onSchedule
(Action0 action) Deprecated.static Action0
RxJavaHooks.onScheduledAction
(Action0 action) Hook to call before the action is scheduled, allows decorating the original action.Methods in rx.plugins that return types with arguments of type Action0Modifier and TypeMethodDescriptionRxJavaHooks.getOnScheduleAction()
Returns the current schedule action hook function or null if it is set to the default pass-through.RxJavaHooks.getOnScheduleAction()
Returns the current schedule action hook function or null if it is set to the default pass-through.Methods in rx.plugins with parameters of type Action0Modifier and TypeMethodDescriptionRxJavaSchedulersHook.onSchedule
(Action0 action) Deprecated.static Action0
RxJavaHooks.onScheduledAction
(Action0 action) Hook to call before the action is scheduled, allows decorating the original action.Method parameters in rx.plugins with type arguments of type Action0Modifier and TypeMethodDescriptionstatic 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. -
Uses of Action0 in rx.schedulers
Fields in rx.schedulers declared as Action0Modifier and TypeFieldDescription(package private) final Action0
TestScheduler.TimedAction.action
Methods in rx.schedulers with parameters of type Action0Modifier and TypeMethodDescriptionConstructors in rx.schedulers with parameters of type Action0ModifierConstructorDescription(package private)
TimedAction
(Scheduler.Worker scheduler, long time, Action0 action) -
Uses of Action0 in rx.subjects
Fields in rx.subjects with type parameters of type Action0Modifier and TypeFieldDescription(package private) final AtomicReference
<Action0> UnicastSubject.State.terminateOnce
Atomically set to true on terminal condition.Methods in rx.subjects with parameters of type Action0Modifier and TypeMethodDescriptionstatic <T> UnicastSubject
<T> 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.Constructors in rx.subjects with parameters of type Action0 -
Uses of Action0 in rx.subscriptions
Fields in rx.subscriptions declared as Action0Modifier and TypeFieldDescription(package private) static final Action0
BooleanSubscription.EMPTY_ACTION
Fields in rx.subscriptions with type parameters of type Action0Modifier and TypeFieldDescription(package private) final AtomicReference
<Action0> BooleanSubscription.actionRef
Methods in rx.subscriptions with parameters of type Action0Modifier and TypeMethodDescriptionstatic BooleanSubscription
Creates aBooleanSubscription
with a specified function to invoke upon unsubscribe.static Subscription
Creates and returns aSubscription
that invokes the givenAction0
when unsubscribed.Constructors in rx.subscriptions with parameters of type Action0
Completable.doOnCompleted(Action0)
instead.