Package rx


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.

  • Class
    Description
    Abstraction over a RxJava Subscriber that allows associating a resource with it and exposes the current number of downstream requested amount.
    Options to handle backpressure in the emitter.
    A functional interface that has a single close method that can throw.
    Generic strategy and default implementations to deal with backpressure buffer overflows.
    Drop most recent items, but not onError nor unsubscribe from source (as {code OperatorOnBackpressureDrop}).
    Drop oldest items from the buffer making room for newer ones.
    onError a MissingBackpressureException and unsubscribe from source.
    Represents a callback called when a value is about to be dropped due to lack of downstream requests.
    Represents a deferred computation without any value but only indication for completion or exception.
    Callback used for building deferred computations that takes a CompletableSubscriber.
    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.
    Represents the subscription API callbacks when subscribing to a Completable instance.
    Convenience interface and callback used by the compose operator to turn a Completable into another Completable fluently.
    An object representing a notification sent to an Observable.
    Specifies the kind of the notification: an element, an error or a completion notification.
    The Observable class that implements the Reactive Pattern.
    Invoked when Observable.subscribe is called.
    Transforms a OnSubscribe.call() into an Observable.subscribe() call.
    Operator function for lifting into an Observable.
    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.
    Provides a mechanism for receiving push-based notifications.
    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).
    A Scheduler is an object that schedules units of work.
    Sequential Scheduler for executing actions on a single thread or event loop.
    The Single class implements the Reactive Pattern for a single value response.
    Invoked when Single.execute is called.
    Provides a mechanism for receiving push-based notifications.
    Provides a mechanism for receiving push-based notifications from Observables, and permits manual unsubscribing from these Observables.
    Subscription returns from Observable.subscribe(Subscriber) to allow unsubscribing.