Package | Description |
---|---|
rx |
Rx Observables
|
rx.observables | |
rx.observers | |
rx.plugins | |
rx.subscriptions |
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 |
---|---|
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 |
Single.subscribe()
Subscribes to a Single but ignore its emission or notification.
|
Subscription |
Observable.subscribe()
Subscribes to an Observable but ignore its emissions and notifications.
|
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 onComplete)
Subscribes to an Observable and provides callbacks to handle the items it emits and any error or
completion notification it issues.
|
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 |
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. |
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 | Class and Description |
---|---|
class |
SafeSubscriber<T>
SafeSubscriber is a wrapper around Subscriber that ensures that the Subscriber
complies with the Rx 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 |
---|---|
<T> Subscription |
RxJavaObservableExecutionHook.onSubscribeReturn(Subscription subscription)
Invoked after successful execution of
Observable.subscribe(rx.Subscriber) with returned
Subscription . |
Modifier and Type | Method and Description |
---|---|
<T> Subscription |
RxJavaObservableExecutionHook.onSubscribeReturn(Subscription subscription)
Invoked after successful execution of
Observable.subscribe(rx.Subscriber) with returned
Subscription . |
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 |
MultipleAssignmentSubscription.get()
Gets the underlying subscription.
|
Subscription |
SerialSubscription.get()
Retrieves the current
Subscription that is being represented by this SerialSubscription . |
Subscription |
RefCountSubscription.get()
Returns a new sub-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. |
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)
Swaps out the old
Subscription for the specified Subscription . |
Constructor and Description |
---|
CompositeSubscription(Subscription... subscriptions) |
RefCountSubscription(Subscription s)
Creates a
RefCountSubscription by wrapping the given non-null Subscription . |
Copyright © 2015. All Rights Reserved.