Package rx
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
A library that enables subscribing to and composing asynchronous events and callbacks.
The Observable/Observer interfaces and associated operators (in the .operations package) are inspired by and attempt to conform to the Reactive Rx library in Microsoft .Net.
More information can be found at http://msdn.microsoft.com/en-us/data/gg577609.
Compared with the Microsoft implementation:
- Observable == IObservable
- Observer == IObserver
- Subscription == IDisposable
- ObservableExtensions == Observable
Services which intend on exposing data asynchronously and wish
to allow reactive processing and composition can implement the Observable
interface which then allows Observers to subscribe to them
and receive events.
Usage examples can be found on the Observable
and Subscriber
classes.
-
Interface Summary Interface Description AsyncEmitter<T> Abstraction over a RxJava Subscriber that allows associating a resource with it and exposes the current number of downstream requested amount.AsyncEmitter.Cancellable A functional interface that has a single close method that can throw.BackpressureOverflow.Strategy Represents a callback called when a value is about to be dropped due to lack of downstream requests.Completable.CompletableOnSubscribe Callback used for building deferred computations that takes a CompletableSubscriber.Completable.CompletableOperator Convenience interface and callback used by the lift operator that given a child CompletableSubscriber, return a parent CompletableSubscriber that does any kind of lifecycle-related transformations.Completable.CompletableSubscriber Represents the subscription API callbacks when subscribing to a Completable instance.Completable.CompletableTransformer Convenience interface and callback used by the compose operator to turn a Completable into another Completable fluently.Observable.OnSubscribe<T> Invoked when Observable.subscribe is called.Observable.Operator<R,T> Operator function for lifting into an Observable.Observable.Transformer<T,R> Function that receives the current Observable and should return another Observable, possibly with given element type, in exchange that will be subscribed to by the downstream operators and subscribers.Observer<T> Provides a mechanism for receiving push-based notifications.Producer Interface that establishes a request-channel between an Observable and a Subscriber and allows the Subscriber to request a certain amount of items from the Observable (otherwise known as backpressure).Single.OnSubscribe<T> Invoked when Single.execute is called.Single.Transformer<T,R> Transformer function used bySingle.compose(rx.Single.Transformer<? super T, ? extends R>)
.Subscription Subscription returns fromObservable.subscribe(Subscriber)
to allow unsubscribing. -
Class Summary Class Description BackpressureOverflow Generic strategy and default implementations to deal with backpressure buffer overflows.BackpressureOverflow.DropLatest Drop most recent items, but notonError
nor unsubscribe from source (as {code OperatorOnBackpressureDrop}).BackpressureOverflow.DropOldest Drop oldest items from the buffer making room for newer ones.BackpressureOverflow.Error onError
a MissingBackpressureException and unsubscribe from source.Completable Represents a deferred computation without any value but only indication for completion or exception.Notification<T> An object representing a notification sent to anObservable
.Observable<T> The Observable class that implements the Reactive Pattern.Observable.OnSubscribeExtend<T> Transforms a OnSubscribe.call() into an Observable.subscribe() call.Scheduler AScheduler
is an object that schedules units of work.Scheduler.Worker Sequential Scheduler for executing actions on a single thread or event loop.Single<T> The Single class implements the Reactive Pattern for a single value response.SingleSubscriber<T> Provides a mechanism for receiving push-based notifications.Subscriber<T> Provides a mechanism for receiving push-based notifications from Observables, and permits manual unsubscribing from these Observables. -
Enum Summary Enum Description AsyncEmitter.BackpressureMode Options to handle backpressure in the emitter.Notification.Kind Specifies the kind of the notification: an element, an error or a completion notification.