Package | Description |
---|---|
rx |
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
|
rx.internal.observers | |
rx.internal.operators |
Operators that allow composing Observables to transform and
manipulate data in an asynchronous, functional and thread-safe manner.
|
rx.internal.schedulers | |
rx.internal.subscriptions | |
rx.internal.util | |
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.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 | Class and Description |
---|---|
static class |
Scheduler.Worker
Sequential Scheduler for executing actions on a single thread or event loop.
|
class |
SingleSubscriber<T>
Provides a mechanism for receiving push-based notifications.
|
class |
Subscriber<T>
Provides a mechanism for receiving push-based notifications from Observables, and permits manual
unsubscribing from these Observables.
|
Modifier and Type | Method and Description |
---|---|
<S extends Scheduler & Subscription> |
Scheduler.when(Func1<Observable<Observable<Completable>>,Completable> combine)
Allows the use of operators for controlling the timing around when
actions scheduled on workers are actually done.
|
Modifier and Type | Method and Description |
---|---|
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()
Subscribes to this Completable and returns a Subscription which can be used to cancel
the subscription.
|
Subscription |
Single.subscribe()
Subscribes to a Single but ignore its emission or notification.
|
Subscription |
Observable.subscribe()
Subscribes to an Observable and ignores
onNext and onCompleted emissions. |
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 |
Single.subscribe(Action1<? super T> onSuccess)
Subscribes to a Single and provides a callback to handle the item it emits.
|
Subscription |
Observable.subscribe(Action1<? super T> onNext)
Subscribes to an Observable and provides a callback to handle the items it emits.
|
Subscription |
Single.subscribe(Action1<? super T> onSuccess,
Action1<Throwable> onError)
Subscribes to a Single and provides callbacks to handle the item it emits or any error notification it
issues.
|
Subscription |
Observable.subscribe(Action1<? super T> onNext,
Action1<Throwable> onError)
Subscribes to an Observable and provides callbacks to handle the items it emits and any error
notification it issues.
|
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.
|
Subscription |
Single.subscribe(Observer<? super T> observer)
Subscribes an Observer to this single and returns a Subscription that allows
unsubscription.
|
Subscription |
Observable.subscribe(Observer<? super T> observer)
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.
|
Subscription |
Single.subscribe(SingleSubscriber<? super T> te)
Subscribes to a Single and provides a
SingleSubscriber that implements functions to handle the
item the Single emits or any error notification it issues. |
Subscription |
Single.subscribe(Subscriber<? super T> subscriber)
Subscribes to a Single and provides a Subscriber that implements functions to handle the item the Single
emits or any error notification it issues.
|
Subscription |
Observable.subscribe(Subscriber<? super T> subscriber)
Subscribes to an Observable and provides a Subscriber that implements functions to handle the items the
Observable emits and any error or completion notification it issues.
|
Subscription |
Single.unsafeSubscribe(Subscriber<? super T> subscriber)
Subscribes to a Single and invokes the
Single.OnSubscribe function without any contract protection,
error handling, unsubscribe, or execution hooks. |
Subscription |
Observable.unsafeSubscribe(Subscriber<? super T> subscriber)
Subscribes to an Observable and invokes
Observable.OnSubscribe function without any contract protection,
error handling, unsubscribe, or execution hooks. |
Modifier and Type | Method and Description |
---|---|
void |
SingleSubscriber.add(Subscription s)
Adds a
Subscription to this Subscriber's list of subscriptions if this list is not marked as
unsubscribed. |
void |
Subscriber.add(Subscription s)
Adds a
Subscription to this Subscriber's list of subscriptions if this list is not marked as
unsubscribed. |
void |
CompletableSubscriber.onSubscribe(Subscription d)
Called once by the Completable to set a Subscription on this instance which
then can be used to cancel the subscription at any time.
|
void |
Emitter.setSubscription(Subscription s)
Sets a Subscription on this emitter; any previous Subscription
or Cancellation will be unsubscribed/cancelled.
|
void |
CompletableEmitter.setSubscription(Subscription s)
Sets a Subscription on this emitter; any previous Subscription
or Cancellation will be unsubscribed/cancelled.
|
void |
SingleEmitter.setSubscription(Subscription s)
Sets a Subscription on this emitter; any previous Subscription
or Cancellation will be unsubscribed/cancelled.
|
Modifier and Type | Method and Description |
---|---|
protected Completable |
Completable.doOnLifecycle(Action1<? super Subscription> onSubscribe,
Action1<? super Throwable> onError,
Action0 onComplete,
Action0 onAfterTerminate,
Action0 onUnsubscribe)
Returns a Completable instance that calls the various callbacks on the specific
lifecycle events.
|
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.
|
Modifier and Type | Class and Description |
---|---|
class |
AssertableSubscriberObservable<T>
A
AssertableSubscriber is a variety of Subscriber that you can use
for unit testing, to perform assertions or inspect received events. |
Modifier and Type | Class and Description |
---|---|
static class |
BlockingOperatorToIterator.SubscriberIterator<T> |
class |
DeferredScalarSubscriber<T,R>
Base class for Subscribers that consume the entire upstream and signal
zero or one element (or an error) in a backpressure honoring fashion.
|
class |
DeferredScalarSubscriberSafe<T,R>
Supplements
DeferredScalarSubscriber with defensive behaviour that ensures no emissions
occur after a terminal event. |
class |
OnSubscribePublishMulticast<T>
Multicasts notifications coming through its input Subscriber view to its
client Subscribers via lockstep backpressure mode.
|
static class |
OperatorGroupBy.GroupBySubscriber<T,K,V> |
class |
OperatorReplay<T> |
Modifier and Type | Method and Description |
---|---|
void |
OperatorReplay.connect(Action1<? super Subscription> connection) |
void |
OperatorPublish.connect(Action1<? super Subscription> connection) |
void |
OperatorMulticast.connect(Action1<? super Subscription> connection) |
Constructor and Description |
---|
OnSubscribeAutoConnect(ConnectableObservable<? extends T> source,
int numberOfSubscribers,
Action1<? super Subscription> connection) |
Modifier and Type | Class and Description |
---|---|
class |
NewThreadWorker
Represents a Scheduler.Worker that runs on its own unique and single-threaded ScheduledExecutorService
created via Executors.
|
class |
ScheduledAction
A
Runnable that executes an Action0 and can be cancelled. |
class |
SchedulerWhen
Allows the use of operators for controlling the timing around when actions
scheduled on workers are actually done.
|
Modifier and Type | Method and Description |
---|---|
Subscription |
NewThreadWorker.schedule(Action0 action) |
Subscription |
NewThreadWorker.schedule(Action0 action,
long delayTime,
TimeUnit unit) |
Subscription |
EventLoopsScheduler.scheduleDirect(Action0 action)
Schedules the action directly on one of the event loop workers
without the additional infrastructure and checking.
|
static Subscription |
SchedulePeriodicHelper.schedulePeriodically(Scheduler.Worker worker,
Action0 action,
long initialDelay,
long period,
TimeUnit unit,
SchedulePeriodicHelper.NowNanoSupplier nowNanoSupplier) |
Modifier and Type | Method and Description |
---|---|
void |
ScheduledAction.add(Subscription s)
Adds a general Subscription to this
ScheduledAction that will be unsubscribed
if the underlying action completes or the this scheduled action is cancelled. |
Modifier and Type | Class and Description |
---|---|
class |
CancellableSubscription
A Subscription that wraps an Cancellable instance.
|
class |
SequentialSubscription
A container of a Subscription that supports operations of SerialSubscription
and MultipleAssignmentSubscription via methods (update, replace) and extends
AtomicReference to reduce allocation count (beware the API leak of AtomicReference!).
|
class |
Unsubscribed
Represents an unsubscribed Subscription via a singleton; don't leak it!
|
Modifier and Type | Method and Description |
---|---|
Subscription |
SequentialSubscription.current()
Returns the current contained Subscription (may be null).
|
Modifier and Type | Method and Description |
---|---|
boolean |
SequentialSubscription.replace(Subscription next)
Atomically replaces the contained Subscription to the provided next value but
does not unsubscribe the previous value or unsubscribes the next value if this
container is unsubscribed.
|
boolean |
SequentialSubscription.replaceWeak(Subscription next)
Atomically tries to replace the contained Subscription to the provided next value but
does not unsubscribe the previous value or unsubscribes the next value if this container
is unsubscribed.
|
boolean |
SequentialSubscription.update(Subscription next)
Atomically sets the contained Subscription to the provided next value and unsubscribes
the previous value or unsubscribes the next value if this container is unsubscribed.
|
boolean |
SequentialSubscription.updateWeak(Subscription next)
Atomically tries to set the contained Subscription to the provided next value and unsubscribes
the previous value or unsubscribes the next value if this container is unsubscribed.
|
Constructor and Description |
---|
SequentialSubscription(Subscription initial)
Create a SequentialSubscription with the given initial Subscription.
|
Modifier and Type | Class and Description |
---|---|
class |
ActionSubscriber<T>
A Subscriber that forwards the onXXX method calls to callbacks.
|
class |
IndexedRingBuffer<E>
Add/Remove without object allocation (after initial construction).
|
class |
ObserverSubscriber<T>
Wraps an Observer and forwards the onXXX method calls to it.
|
class |
RxRingBuffer
This assumes Spsc or Spmc usage.
|
class |
SubscriptionList
Subscription that represents a group of Subscriptions that are unsubscribed together.
|
Modifier and Type | Method and Description |
---|---|
void |
SubscriptionList.add(Subscription s)
|
static void |
BlockingUtils.awaitForComplete(CountDownLatch latch,
Subscription subscription)
Blocks and waits for a
Subscription to complete. |
void |
SubscriptionList.remove(Subscription s) |
Constructor and Description |
---|
SubscriptionList(Subscription... subscriptions)
Constructs a SubscriptionList with the given initial child subscriptions.
|
SubscriptionList(Subscription s)
Constructs a SubscriptionList with the given initial child subscription.
|
Modifier and Type | Method and Description |
---|---|
Subscription |
ConnectableObservable.connect()
Instructs the
ConnectableObservable to begin emitting the items from its underlying
Observable to its Subscriber s. |
Modifier and Type | Method and Description |
---|---|
Observable<T> |
ConnectableObservable.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 the
ConnectableObservable to begin emitting the items from its underlying
Observable to its Subscriber s. |
Modifier and Type | Interface and Description |
---|---|
interface |
AssertableSubscriber<T>
Interface for asserting the state of a sequence under testing with a
test()
method of a reactive base class. |
Modifier and Type | Class and Description |
---|---|
class |
AsyncCompletableSubscriber
An abstract base class for CompletableSubscriber implementations that want to expose an unsubscription
capability.
|
class |
SafeCompletableSubscriber
Wraps another CompletableSubscriber and handles exceptions thrown
from onError and onCompleted.
|
class |
SafeSubscriber<T>
SafeSubscriber is a wrapper around Subscriber that ensures that the Subscriber
complies with the Observable contract. |
class |
SerializedSubscriber<T>
Enforces single-threaded, serialized, ordered execution of
SerializedSubscriber.onNext(T) , SerializedSubscriber.onCompleted() , and
SerializedSubscriber.onError(java.lang.Throwable) . |
class |
TestSubscriber<T>
A
TestSubscriber is a variety of Subscriber that you can use for unit testing, to perform
assertions, inspect received events, or wrap a mocked Subscriber . |
Modifier and Type | Method and Description |
---|---|
void |
AsyncCompletableSubscriber.onSubscribe(Subscription d) |
void |
SafeCompletableSubscriber.onSubscribe(Subscription d) |
Modifier and Type | Method and Description |
---|---|
static Subscription |
RxJavaHooks.onObservableReturn(Subscription subscription)
Hook to call before the Observable.subscribe() method is about to return a Subscription.
|
static Subscription |
RxJavaHooks.onSingleReturn(Subscription subscription)
Hook to call before the Single.subscribe() method is about to return a Subscription.
|
<T> Subscription |
RxJavaObservableExecutionHook.onSubscribeReturn(Subscription subscription)
Deprecated.
|
<T> Subscription |
RxJavaSingleExecutionHook.onSubscribeReturn(Subscription subscription)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static Func1<Subscription,Subscription> |
RxJavaHooks.getOnObservableReturn()
Returns the current Observable onReturn hook function or null if it is
set to the default pass-through.
|
static Func1<Subscription,Subscription> |
RxJavaHooks.getOnObservableReturn()
Returns the current Observable onReturn hook function or null if it is
set to the default pass-through.
|
static Func1<Subscription,Subscription> |
RxJavaHooks.getOnSingleReturn()
Returns the current Single onReturn hook function or null if it is
set to the default pass-through.
|
static Func1<Subscription,Subscription> |
RxJavaHooks.getOnSingleReturn()
Returns the current Single onReturn hook function or null if it is
set to the default pass-through.
|
Modifier and Type | Method and Description |
---|---|
static Subscription |
RxJavaHooks.onObservableReturn(Subscription subscription)
Hook to call before the Observable.subscribe() method is about to return a Subscription.
|
static Subscription |
RxJavaHooks.onSingleReturn(Subscription subscription)
Hook to call before the Single.subscribe() method is about to return a Subscription.
|
<T> Subscription |
RxJavaObservableExecutionHook.onSubscribeReturn(Subscription subscription)
Deprecated.
|
<T> Subscription |
RxJavaSingleExecutionHook.onSubscribeReturn(Subscription subscription)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static void |
RxJavaHooks.setOnObservableReturn(Func1<Subscription,Subscription> onObservableReturn)
Sets a hook function that is called when the Observable.subscribe() call
is about to return a Subscription unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnObservableReturn(Func1<Subscription,Subscription> onObservableReturn)
Sets a hook function that is called when the Observable.subscribe() call
is about to return a Subscription unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnSingleReturn(Func1<Subscription,Subscription> onSingleReturn)
Sets a hook function that is called when the Single.subscribe() call
is about to return a Subscription unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnSingleReturn(Func1<Subscription,Subscription> onSingleReturn)
Sets a hook function that is called when the Single.subscribe() call
is about to return a Subscription unless a lockdown is in effect.
|
Modifier and Type | Class and Description |
---|---|
class |
BooleanSubscription
Subscription that can be checked for status such as in a loop inside an
Observable to exit the loop
if unsubscribed. |
class |
CompositeSubscription
Subscription that represents a group of Subscriptions that are unsubscribed together.
|
class |
MultipleAssignmentSubscription
Subscription that can be checked for status such as in a loop inside an
Observable to exit the loop
if unsubscribed. |
class |
RefCountSubscription
Keeps track of the sub-subscriptions and unsubscribes the underlying subscription once all sub-subscriptions
have unsubscribed.
|
class |
SerialSubscription
Represents a subscription whose underlying subscription can be swapped for another subscription which causes
the previous underlying subscription to be unsubscribed.
|
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 Subscription |
Subscriptions.empty()
|
static Subscription |
Subscriptions.from(Future<?> f)
Converts a
Future into a Subscription and cancels it when unsubscribed. |
Subscription |
RefCountSubscription.get()
Returns a new sub-subscription
|
Subscription |
MultipleAssignmentSubscription.get()
Gets the underlying subscription.
|
Subscription |
SerialSubscription.get()
Gets the underlying subscription.
|
static Subscription |
Subscriptions.unsubscribed()
Returns a
Subscription to which unsubscribe does nothing, as it is already unsubscribed. |
Modifier and Type | Method and Description |
---|---|
void |
CompositeSubscription.add(Subscription s)
Adds a new
Subscription to this CompositeSubscription if the
CompositeSubscription is not yet unsubscribed. |
void |
CompositeSubscription.addAll(Subscription... subscriptions)
Adds collection of
Subscription to this CompositeSubscription if the
CompositeSubscription is not yet unsubscribed. |
static CompositeSubscription |
Subscriptions.from(Subscription... subscriptions)
Converts a set of
Subscription s into a CompositeSubscription that groups the multiple
Subscriptions together and unsubscribes from all of them together. |
void |
CompositeSubscription.remove(Subscription s)
|
void |
MultipleAssignmentSubscription.set(Subscription s)
Sets the underlying subscription.
|
void |
SerialSubscription.set(Subscription s)
Sets the underlying subscription.
|
Constructor and Description |
---|
CompositeSubscription(Subscription... subscriptions) |
RefCountSubscription(Subscription s)
Creates a
RefCountSubscription by wrapping the given non-null Subscription . |
Copyright © 2017. All rights reserved.