Uses of Interface
rx.functions.Action1
Packages that use Action1
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.
Classes extending the Observable base reactive class and implementing
the Observer interface at the same time (aka hot Observables).
-
Uses of Action1 in rx
Modifier and TypeInterfaceDescriptionstatic interface
Callback used for building deferred computations that takes a CompletableSubscriber.static interface
Invoked when Observable.subscribe is called.static interface
Invoked when Single.execute is called.Modifier and TypeClassDescription(package private) static final class
Transforms a OnSubscribe.call() into an Observable.subscribe() call.Modifier and TypeMethodDescriptionfinal Observable
<T> Observable.doOnEach
(Action1<Notification<? super T>> onNotification) Modifies the source Observable so that it invokes an action for each item it emits.final Completable
Returns a Completable which calls the given onError callback if this Completable emits an error.final Observable
<T> Modifies the source Observable so that it invokes an action if it callsonError
.Modifies the sourceSingle
so that it invokes an action if it callsonError
.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> Modifies the source Observable so that it invokes an action when it callsonNext
.final Observable
<T> Observable.doOnRequest
(Action1<Long> onRequest) Modifies the sourceObservable
so that it invokes the given action when it receives a request for more items.final Completable
Completable.doOnSubscribe
(Action1<? super Subscription> onSubscribe) Returns a Completable instance that calls the given onSubscribe callback with the disposable that child subscribers receive on subscription.Single.doOnSuccess
(Action1<? super T> onSuccess) Modifies the sourceSingle
so that it invokes an action when it callsonSuccess
.final void
Subscribes to theObservable
and receives notifications for each element.final void
Subscribes to theObservable
and receives notifications for each element and error events.final void
Subscribes to theObservable
and receives notifications for each element and the terminal events.static <T> Observable
<T> Observable.fromAsync
(Action1<AsyncEmitter<T>> asyncEmitter, AsyncEmitter.BackpressureMode backpressure) Provides an API (via a cold Observable) that bridges the reactive world with the callback-style, generally non-backpressured world.final Observable
<T> Observable.onBackpressureDrop
(Action1<? super T> onDrop) Instructs an Observable that is emitting items faster than its observer can consume them to discard, rather than emit, those items that its observer is not prepared to observe.final Subscription
Subscribes to this Completable and calls back either the onError or onComplete functions.final Subscription
Subscribes to an Observable and provides a callback to handle the items it emits.final Subscription
Subscribes to an Observable and provides callbacks to handle the items it emits and any error notification it issues.final Subscription
Subscribes to an Observable and provides callbacks to handle the items it emits and any error or completion notification it issues.final Subscription
Subscribes to a Single and provides a callback to handle the item it emits.final Subscription
Subscribes to a Single and provides callbacks to handle the item it emits or any error notification it issues.static <R> Completable
Completable.using
(Func0<R> resourceFunc0, Func1<? super R, ? extends Completable> completableFunc1, Action1<? super R> disposer) Returns a Completable instance which manages a resource along with a custom Completable instance while the subscription is active.static <R> Completable
Completable.using
(Func0<R> resourceFunc0, Func1<? super R, ? extends Completable> completableFunc1, Action1<? super R> disposer, boolean eager) Returns a Completable instance which manages a resource along with a custom Completable instance while the subscription is active and performs eager or lazy resource disposition.static <T,
Resource>
Observable<T> Observable.using
(Func0<Resource> resourceFactory, Func1<? super Resource, ? extends Observable<? extends T>> observableFactory, Action1<? super Resource> disposeAction) Constructs an Observable that creates a dependent resource object which is disposed of on unsubscription.static <T,
Resource>
Observable<T> Observable.using
(Func0<Resource> resourceFactory, Func1<? super Resource, ? extends Observable<? extends T>> observableFactory, Action1<? super Resource> disposeAction, boolean disposeEagerly) Constructs an Observable that creates a dependent resource object which is disposed of just before termination if you have setdisposeEagerly
totrue
and unsubscription does not occur before termination.static <T,
Resource>
Single<T> Single.using
(Func0<Resource> resourceFactory, Func1<? super Resource, ? extends Single<? extends T>> singleFactory, Action1<? super Resource> disposeAction) Constructs an Single that creates a dependent resource object which is disposed of on unsubscription.static <T,
Resource>
Single<T> Single.using
(Func0<Resource> resourceFactory, Func1<? super Resource, ? extends Single<? extends T>> singleFactory, Action1<? super Resource> disposeAction, boolean disposeEagerly) Constructs an Single that creates a dependent resource object which is disposed of just before termination if you have setdisposeEagerly
totrue
and unsubscription does not occur before termination. -
Uses of Action1 in rx.functions
Classes in rx.functions that implement Action1Modifier and TypeClassDescription(package private) static final class
(package private) static final class
Actions.EmptyAction<T0,
T1, T2, T3, T4, T5, T6, T7, T8> Methods in rx.functions that return Action1Modifier and TypeMethodDescriptionstatic <T> Action1
<T> Wraps an Action0 instance into an Action1 instance where the latter calls the former.Methods in rx.functions with parameters of type Action1Modifier and TypeMethodDescriptionFunctions.fromAction
(Action1<? super T0> f) Converts anAction1
to a function that calls the action and returnsnull
.static <T1,
R> Func1 <T1, R> Converts anAction1
to a function that calls the action and returns a specified value. -
Uses of Action1 in rx.internal.operators
Classes in rx.internal.operators that implement Action1Modifier and TypeClassDescription(package private) static final class
(package private) static final class
Manages the subscription of child subscribers by setting up a replay producer and performs auto-connection of the very first subscription.final class
final class
final class
final class
final class
final class
final class
final class
final class
enum
Holds a singleton instance of an empty Observable which is stateless and completes the child subscriber immediately.enum
Holds a singleton instance of a never Observable which is stateless doesn't call any of the Subscriber's methods.final class
Given multipleObservable
s, propagates the one that first emits an item.final class
Wraps a ConnectableObservable and calls its connect() method once the specified number of Subscribers have subscribed.final class
OnSubscribeCollect<T,
R> final class
final class
OnSubscribeConcatMap<T,
R> Maps a source sequence into Observables and concatenates them in order, subscribing to one at a time.final class
Do not create the Observable until an Observer subscribes; create a fresh Observable on each subscription.final class
Delays the subscription to the source by the given amount, running on the given scheduler.final class
Delays the subscription to the main source until the other observable fires an event or completes.final class
Delays the subscription until the Observable emits an event.final class
Nulls out references to upstream data structures when the source terminates or the child unsubscribes.final class
Filters an Observable by discarding any items it emits that do not meet some test.final class
Flattens a sequence if Iterable sources, generated via a function, into a single sequence.(package private) static final class
A custom flattener that works from a scalar value and computes the iterable during subscription time.final class
final class
final class
Do not invoke the function until an Observer subscribes; Invokes function on each subscription.final class
Converts anIterable
sequence into anObservable
.final class
OnSubscribeGroupJoin<T1,
T2, D1, D2, R> Correlates two sequences when they overlap and groups the results.(package private) static final class
The reference-counted window observable.final class
OnSubscribeJoin<TLeft,
TRight, TLeftDuration, TRightDuration, R> Correlates the elements of two sequences based on overlapping durations.final class
OnSubscribeLift<T,
R> Transforms the downstream Subscriber into a Subscriber via an operator callback and calls the parent OnSubscribe.call() method with it.final class
OnSubscribeMap<T,
R> Applies a function of your choosing to every item emitted by anObservable
, and emits the results of this transformation as a newObservable
.final class
Captures the current stack when it is instantiated, makes it available through a field and attaches it to all passing exception.final class
Captures the current stack when it is instantiated, makes it available through a field and attaches it to all passing exception.final class
Captures the current stack when it is instantiated, makes it available through a field and attaches it to all passing exception.final class
Multicasts notifications coming through its input Subscriber view to its client Subscribers via lockstep backpressure mode.final class
Emit ints from start to end inclusive.final class
final class
final class
final class
Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.class
Allows conversion of an Observable to a Single ensuring that exactly one item is emitted - no more and no less.final class
final class
final class
Timer that emits a single 0L and completes after the specified time.final class
Emit 0L after the initial period and ever increasing number after each period.(package private) static class
final class
OnSubscribeUsing<T,
Resource> Constructs an observable sequence that depends on a resource object.(package private) static class
(package private) static final class
final class
Subscribes Observers on the specifiedScheduler
.final class
final class
Execute an action after onSuccess or onError has been delivered.final class
Delays the subscription to the Single until the Observable fires an event or completes.final class
SingleOnSubscribeMap<T,
R> Applies a function of your choosing to every item emitted by anSingle
, and emits the results of this transformation as a newSingle
.final class
SingleOnSubscribeUsing<T,
Resource> Generates a resource, derives a Single from it and disposes that resource once the Single terminates.final class
Fields in rx.internal.operators declared as Action1Modifier and TypeFieldDescription(package private) final Action1
<AsyncEmitter<T>> OnSubscribeFromAsync.asyncEmitter
(package private) final Action1
<? super Subscription> OnSubscribeAutoConnect.connection
OnSubscribeUsing.dispose
OnSubscribeUsing.DisposeAction.dispose
SingleOnSubscribeUsing.disposeAction
OperatorOnBackpressureDrop.onDrop
OperatorDoOnRequest.request
Fields in rx.internal.operators with type parameters of type Action1Methods in rx.internal.operators that return Action1Modifier and TypeMethodDescriptionprivate Action1
<Subscription> OnSubscribeRefCount.onSubscribe
(Subscriber<? super T> subscriber, AtomicBoolean writeLocked) Methods in rx.internal.operators with parameters of type Action1Modifier and TypeMethodDescriptionvoid
OperatorMulticast.connect
(Action1<? super Subscription> connection) void
OperatorPublish.connect
(Action1<? super Subscription> connection) void
OperatorReplay.connect
(Action1<? super Subscription> connection) private Map
<Object, OperatorGroupBy.GroupedUnicast<K, V>> OperatorGroupBy.GroupBySubscriber.createMap
(Func1<Action1<K>, Map<K, Object>> mapFactory, Action1<K> evictionAction) Method parameters in rx.internal.operators with type arguments of type Action1Modifier and TypeMethodDescriptionprivate Map
<Object, OperatorGroupBy.GroupedUnicast<K, V>> OperatorGroupBy.GroupBySubscriber.createMap
(Func1<Action1<K>, Map<K, Object>> mapFactory, Action1<K> evictionAction) Constructors in rx.internal.operators with parameters of type Action1ModifierConstructorDescription(package private)
DisposeAction
(Action1<? super Resource> dispose, Resource resource) OnSubscribeAutoConnect
(ConnectableObservable<? extends T> source, int numberOfSubscribers, Action1<? super Subscription> connection) OnSubscribeFromAsync
(Action1<AsyncEmitter<T>> asyncEmitter, AsyncEmitter.BackpressureMode backpressure) OnSubscribeUsing
(Func0<Resource> resourceFactory, Func1<? super Resource, ? extends Observable<? extends T>> observableFactory, Action1<? super Resource> dispose, boolean disposeEagerly) OperatorDoOnRequest
(Action1<Long> request) OperatorOnBackpressureDrop
(Action1<? super T> onDrop) SingleOnSubscribeUsing
(Func0<Resource> resourceFactory, Func1<? super Resource, ? extends Single<? extends T>> observableFactory, Action1<? super Resource> disposeAction, boolean disposeEagerly) -
Uses of Action1 in rx.internal.util
Classes in rx.internal.util that implement Action1Modifier and TypeClassDescription(package private) static final class
(package private) static final class
The OnSubscribe callback for the Observable constructor.(package private) static final class
The OnSubscribe implementation that creates the ScalarAsyncProducer for each incoming subscriber.(package private) static final class
Optimized observeOn for scalar value observed on the EventLoopsScheduler.(package private) static final class
Emits a scalar value on a general scheduler.Fields in rx.internal.util declared as Action1Modifier and TypeFieldDescriptionInternalObservableUtils.ERROR_NOT_IMPLEMENTED
Throws an OnErrorNotImplementedException when called.ActionSubscriber.onError
ActionSubscriber.onNext
(package private) final Action1
<Notification<? super T>> ActionNotificationObserver.onNotification
Methods in rx.internal.util with parameters of type Action1Constructors in rx.internal.util with parameters of type Action1ModifierConstructorDescriptionActionNotificationObserver
(Action1<Notification<? super T>> onNotification) -
Uses of Action1 in rx.observables
Classes in rx.observables that implement Action1Modifier and TypeClassDescriptionclass
AsyncOnSubscribe<S,
T> A utility class to createOnSubscribe<T>
functions that respond correctly to back pressure requests from subscribers.(package private) static final class
An implementation of AsyncOnSubscribe that delegatesAsyncOnSubscribe.next(Object, long, Observer)
,AsyncOnSubscribe.generateState()
, andAsyncOnSubscribe.onUnsubscribe(Object)
to provided functions/closures.(package private) static final class
class
SyncOnSubscribe<S,
T> A utility class to createOnSubscribe<T>
functions that respond correctly to back pressure requests from subscribers.(package private) static final class
An implementation of SyncOnSubscribe that delegatesinvalid reference
SyncOnSubscribe#next(Object, Subscriber)
SyncOnSubscribe.generateState()
, andSyncOnSubscribe.onUnsubscribe(Object)
to provided functions/closures.Fields in rx.observables declared as Action1Modifier and TypeFieldDescriptionAsyncOnSubscribe.AsyncOnSubscribeImpl.onUnsubscribe
SyncOnSubscribe.SyncOnSubscribeImpl.onUnsubscribe
Methods in rx.observables with parameters of type Action1Modifier and TypeMethodDescriptionConnectableObservable.autoConnect
(int numberOfSubscribers, Action1<? super Subscription> connection) Returns an Observable that automatically connects to this ConnectableObservable when the specified number of Subscribers subscribe to it and calls the specified callback with the Subscription associated with the established connection.abstract void
ConnectableObservable.connect
(Action1<? super Subscription> connection) Instructs theConnectableObservable
to begin emitting the items from its underlyingObservable
to itsSubscriber
s.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, 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, 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, Action1<? super S> onUnsubscribe) 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) 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.void
Invokes a method on each item emitted by thisBlockingObservable
and blocks until the Observable completes.void
Subscribes to the source and calls the given action on the current thread and rethrows any exception wrapped into OnErrorNotImplementedException.void
Subscribes to the source and calls the given actions on the current thread.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.Constructors in rx.observables with parameters of type Action1ModifierConstructorDescription(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> next, Action1<? super S> onUnsubscribe) (package private)
SyncOnSubscribeImpl
(Func0<? extends S> generator, Func2<? super S, ? super Observer<? super T>, ? extends S> next, Action1<? super S> onUnsubscribe) -
Uses of Action1 in rx.observers
Methods in rx.observers with parameters of type Action1Modifier 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> Subscriber
<T> Creates aSubscriber
that receives the emissions of anyObservable
it subscribes to viaonNext
but ignoresonCompleted
notifications; it will throw anOnErrorNotImplementedException
ifonError
is invoked.static <T> Subscriber
<T> Creates anSubscriber
that receives the emissions of anyObservable
it subscribes to viaonNext
and handles anyonError
notification but ignores anonCompleted
notification.static <T> Subscriber
<T> Creates anSubscriber
that receives the emissions of anyObservable
it subscribes to viaonNext
and handles anyonError
oronCompleted
notifications. -
Uses of Action1 in rx.plugins
Fields in rx.plugins declared as Action1Methods in rx.plugins that return Action1Modifier and TypeMethodDescriptionRxJavaHooks.getOnError()
Returns the current global error handler hook action or null if it is set to the default one that signals errors to the current threads UncaughtExceptionHandler.Methods in rx.plugins with parameters of type Action1Modifier and TypeMethodDescriptionstatic void
RxJavaHooks.setOnError
(Action1<Throwable> onError) Sets the global error consumer action unless a lockdown is in effect. -
Uses of Action1 in rx.subjects
Classes in rx.subjects that implement Action1Modifier and TypeClassDescription(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.(package private) final class
Represents the typical state and OnSubscribe logic for a Subject implementation.(package private) static final class
The single-consumption replaying state.Fields in rx.subjects declared as Action1Modifier and TypeFieldDescription(package private) Action1
<SubjectSubscriptionManager.SubjectObserver<T>> SubjectSubscriptionManager.onAdded
Action called after the subscriber has been added to the state.(package private) Action1
<SubjectSubscriptionManager.SubjectObserver<T>> SubjectSubscriptionManager.onStart
Action called when a new subscriber subscribes but before it is added to the state.(package private) Action1
<SubjectSubscriptionManager.SubjectObserver<T>> SubjectSubscriptionManager.onTerminated
Action called when the subscriber wants to subscribe to a terminal state.