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 interfaceCallback used for building deferred computations that takes a CompletableSubscriber.static interfaceInvoked when Observable.subscribe is called.static interfaceInvoked when Single.execute is called.Modifier and TypeClassDescription(package private) static final classTransforms 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 CompletableReturns 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 sourceSingleso that it invokes an action if it callsonError.protected final CompletableCompletable.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 sourceObservableso that it invokes the given action when it receives a request for more items.final CompletableCompletable.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 sourceSingleso that it invokes an action when it callsonSuccess.final voidSubscribes to theObservableand receives notifications for each element.final voidSubscribes to theObservableand receives notifications for each element and error events.final voidSubscribes to theObservableand 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 SubscriptionSubscribes to this Completable and calls back either the onError or onComplete functions.final SubscriptionSubscribes to an Observable and provides a callback to handle the items it emits.final SubscriptionSubscribes to an Observable and provides callbacks to handle the items it emits and any error notification it issues.final SubscriptionSubscribes to an Observable and provides callbacks to handle the items it emits and any error or completion notification it issues.final SubscriptionSubscribes to a Single and provides a callback to handle the item it emits.final SubscriptionSubscribes to a Single and provides callbacks to handle the item it emits or any error notification it issues.static <R> CompletableCompletable.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> CompletableCompletable.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 setdisposeEagerlytotrueand 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 setdisposeEagerlytotrueand 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 classActions.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 anAction1to a function that calls the action and returnsnull.static <T1,R> Func1 <T1, R> Converts anAction1to 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 classManages the subscription of child subscribers by setting up a replay producer and performs auto-connection of the very first subscription.final classfinal classfinal classfinal classfinal classfinal classfinal classfinal classfinal classenumHolds a singleton instance of an empty Observable which is stateless and completes the child subscriber immediately.enumHolds a singleton instance of a never Observable which is stateless doesn't call any of the Subscriber's methods.final classGiven multipleObservables, propagates the one that first emits an item.final classWraps a ConnectableObservable and calls its connect() method once the specified number of Subscribers have subscribed.final classOnSubscribeCollect<T,R> final classfinal classOnSubscribeConcatMap<T,R> Maps a source sequence into Observables and concatenates them in order, subscribing to one at a time.final classDo not create the Observable until an Observer subscribes; create a fresh Observable on each subscription.final classDelays the subscription to the source by the given amount, running on the given scheduler.final classDelays the subscription to the main source until the other observable fires an event or completes.final classDelays the subscription until the Observable emits an event.final classNulls out references to upstream data structures when the source terminates or the child unsubscribes.final classFilters an Observable by discarding any items it emits that do not meet some test.final classFlattens a sequence if Iterable sources, generated via a function, into a single sequence.(package private) static final classA custom flattener that works from a scalar value and computes the iterable during subscription time.final classfinal classfinal classDo not invoke the function until an Observer subscribes; Invokes function on each subscription.final classConverts anIterablesequence into anObservable.final classOnSubscribeGroupJoin<T1,T2, D1, D2, R> Correlates two sequences when they overlap and groups the results.(package private) static final classThe reference-counted window observable.final classOnSubscribeJoin<TLeft,TRight, TLeftDuration, TRightDuration, R> Correlates the elements of two sequences based on overlapping durations.final classOnSubscribeLift<T,R> Transforms the downstream Subscriber into a Subscriber via an operator callback and calls the parent OnSubscribe.call() method with it.final classOnSubscribeMap<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 classCaptures the current stack when it is instantiated, makes it available through a field and attaches it to all passing exception.final classCaptures the current stack when it is instantiated, makes it available through a field and attaches it to all passing exception.final classCaptures the current stack when it is instantiated, makes it available through a field and attaches it to all passing exception.final classMulticasts notifications coming through its input Subscriber view to its client Subscribers via lockstep backpressure mode.final classEmit ints from start to end inclusive.final classfinal classfinal classfinal classReturns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.classAllows conversion of an Observable to a Single ensuring that exactly one item is emitted - no more and no less.final classfinal classfinal classTimer that emits a single 0L and completes after the specified time.final classEmit 0L after the initial period and ever increasing number after each period.(package private) static classfinal classOnSubscribeUsing<T,Resource> Constructs an observable sequence that depends on a resource object.(package private) static class(package private) static final classfinal classSubscribes Observers on the specifiedScheduler.final classfinal classExecute an action after onSuccess or onError has been delivered.final classDelays the subscription to the Single until the Observable fires an event or completes.final classSingleOnSubscribeMap<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 classSingleOnSubscribeUsing<T,Resource> Generates a resource, derives a Single from it and disposes that resource once the Single terminates.final classFields in rx.internal.operators declared as Action1Modifier and TypeFieldDescription(package private) final Action1<AsyncEmitter<T>> OnSubscribeFromAsync.asyncEmitter(package private) final Action1<? super Subscription> OnSubscribeAutoConnect.connectionOnSubscribeUsing.disposeOnSubscribeUsing.DisposeAction.disposeSingleOnSubscribeUsing.disposeActionOperatorOnBackpressureDrop.onDropOperatorDoOnRequest.requestFields 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 TypeMethodDescriptionvoidOperatorMulticast.connect(Action1<? super Subscription> connection) voidOperatorPublish.connect(Action1<? super Subscription> connection) voidOperatorReplay.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 classThe OnSubscribe callback for the Observable constructor.(package private) static final classThe OnSubscribe implementation that creates the ScalarAsyncProducer for each incoming subscriber.(package private) static final classOptimized observeOn for scalar value observed on the EventLoopsScheduler.(package private) static final classEmits a scalar value on a general scheduler.Fields in rx.internal.util declared as Action1Modifier and TypeFieldDescriptionInternalObservableUtils.ERROR_NOT_IMPLEMENTEDThrows an OnErrorNotImplementedException when called.ActionSubscriber.onErrorActionSubscriber.onNext(package private) final Action1<Notification<? super T>> ActionNotificationObserver.onNotificationMethods 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 TypeClassDescriptionclassAsyncOnSubscribe<S,T> A utility class to createOnSubscribe<T>functions that respond correctly to back pressure requests from subscribers.(package private) static final classAn implementation of AsyncOnSubscribe that delegatesAsyncOnSubscribe.next(Object, long, Observer),AsyncOnSubscribe.generateState(), andAsyncOnSubscribe.onUnsubscribe(Object)to provided functions/closures.(package private) static final classclassSyncOnSubscribe<S,T> A utility class to createOnSubscribe<T>functions that respond correctly to back pressure requests from subscribers.(package private) static final classAn implementation of SyncOnSubscribe that delegates,invalid reference
SyncOnSubscribe#next(Object, Subscriber)SyncOnSubscribe.generateState(), andSyncOnSubscribe.onUnsubscribe(Object)to provided functions/closures.Fields in rx.observables declared as Action1Modifier and TypeFieldDescriptionAsyncOnSubscribe.AsyncOnSubscribeImpl.onUnsubscribeSyncOnSubscribe.SyncOnSubscribeImpl.onUnsubscribeMethods 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 voidConnectableObservable.connect(Action1<? super Subscription> connection) Instructs theConnectableObservableto begin emitting the items from its underlyingObservableto itsSubscribers.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 synchronousAsyncOnSubscribethat calls the providednextfunction 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 synchronousSyncOnSubscribethat calls the providednextfunction 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 synchronousAsyncOnSubscribethat calls the providednextfunction 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 synchronousSyncOnSubscribethat calls the providednextfunction to generate data to downstream subscribers.static <T> SyncOnSubscribe<Void, T> SyncOnSubscribe.createStateless(Action1<? super Observer<? super T>> next) Generates a synchronousSyncOnSubscribethat calls the providednextfunction to generate data to downstream subscribers.static <T> SyncOnSubscribe<Void, T> SyncOnSubscribe.createStateless(Action1<? super Observer<? super T>> next, Action0 onUnsubscribe) Generates a synchronousSyncOnSubscribethat calls the providednextfunction to generate data to downstream subscribers.voidInvokes a method on each item emitted by thisBlockingObservableand blocks until the Observable completes.voidSubscribes to the source and calls the given action on the current thread and rethrows any exception wrapped into OnErrorNotImplementedException.voidSubscribes to the source and calls the given actions on the current thread.voidBlockingObservable.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 anObserverthat receives the emissions of anyObservableit subscribes to viaonNextbut ignoresonCompletednotifications; it will throw anOnErrorNotImplementedExceptionifonErroris invoked.static <T> Observer<T> Creates anObserverthat receives the emissions of anyObservableit subscribes to viaonNextand handles anyonErrornotification but ignores anonCompletednotification.static <T> Observer<T> Creates anObserverthat receives the emissions of anyObservableit subscribes to viaonNextand handles anyonErrororonCompletednotifications.static <T> Subscriber<T> Creates aSubscriberthat receives the emissions of anyObservableit subscribes to viaonNextbut ignoresonCompletednotifications; it will throw anOnErrorNotImplementedExceptionifonErroris invoked.static <T> Subscriber<T> Creates anSubscriberthat receives the emissions of anyObservableit subscribes to viaonNextand handles anyonErrornotification but ignores anonCompletednotification.static <T> Subscriber<T> Creates anSubscriberthat receives the emissions of anyObservableit subscribes to viaonNextand handles anyonErrororonCompletednotifications. -
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 voidRxJavaHooks.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 classHolds 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 classRepresents the typical state and OnSubscribe logic for a Subject implementation.(package private) static final classThe single-consumption replaying state.Fields in rx.subjects declared as Action1Modifier and TypeFieldDescription(package private) Action1<SubjectSubscriptionManager.SubjectObserver<T>> SubjectSubscriptionManager.onAddedAction called after the subscriber has been added to the state.(package private) Action1<SubjectSubscriptionManager.SubjectObserver<T>> SubjectSubscriptionManager.onStartAction called when a new subscriber subscribes but before it is added to the state.(package private) Action1<SubjectSubscriptionManager.SubjectObserver<T>> SubjectSubscriptionManager.onTerminatedAction called when the subscriber wants to subscribe to a terminal state.