|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrx.plugins.RxJavaObservableExecutionHook
public abstract class RxJavaObservableExecutionHook
Abstract ExecutionHook with invocations at different lifecycle points of Observable execution with a
default no-op implementation.
See RxJavaPlugins or the RxJava GitHub Wiki for information on configuring plugins:
https://github.com/Netflix/RxJava/wiki/Plugins.
Note on thread-safety and performance:
A single implementation of this class will be used globally so methods on this class will be invoked concurrently from multiple threads so all functionality must be thread-safe.
Methods are also invoked synchronously and will add to execution time of the observable so all behavior should be fast. If anything time-consuming is to be done it should be spawned asynchronously onto separate worker threads.
| Constructor Summary | |
|---|---|
RxJavaObservableExecutionHook()
|
|
| Method Summary | ||
|---|---|---|
|
onCreate(Observable.OnSubscribe<T> f)
Invoked during the construction by Observable.create(OnSubscribe) |
|
|
onLift(Observable.Operator<? extends R,? super T> lift)
Invoked just as the operator functions is called to bind two operations together into a new Observable and the return value is used as the lifted function |
|
|
onSubscribeError(java.lang.Throwable e)
Invoked after failed execution of Observable.subscribe(Subscriber) with thrown Throwable. |
|
|
onSubscribeReturn(Subscription subscription)
Invoked after successful execution of Observable.subscribe(rx.Subscriber) with returned
Subscription. |
|
|
onSubscribeStart(Observable<? extends T> observableInsance,
Observable.OnSubscribe<T> onSubscribe)
Invoked before Observable.subscribe(rx.Subscriber) is about to be executed. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RxJavaObservableExecutionHook()
| Method Detail |
|---|
public <T> Observable.OnSubscribe<T> onCreate(Observable.OnSubscribe<T> f)
Observable.create(OnSubscribe)
This can be used to decorate or replace the onSubscribe function or just perform extra
logging, metrics and other such things and pass-thru the function.
f - original Observable.OnSubscribe<T> to be executed
Observable.OnSubscribe<T> function that can be modified, decorated, replaced or just
returned as a pass-thru
public <T> Observable.OnSubscribe<T> onSubscribeStart(Observable<? extends T> observableInsance,
Observable.OnSubscribe<T> onSubscribe)
Observable.subscribe(rx.Subscriber) is about to be executed.
This can be used to decorate or replace the onSubscribe function or just perform extra
logging, metrics and other such things and pass-thru the function.
onSubscribe - original Observable.OnSubscribe<T> to be executed
Observable.OnSubscribe<T> function that can be modified, decorated, replaced or just
returned as a pass-thrupublic <T> Subscription onSubscribeReturn(Subscription subscription)
Observable.subscribe(rx.Subscriber) with returned
Subscription.
This can be used to decorate or replace the Subscription instance or just perform extra logging,
metrics and other such things and pass-thru the subscription.
subscription - original Subscription
Subscription subscription that can be modified, decorated, replaced or just returned as a
pass-thrupublic <T> java.lang.Throwable onSubscribeError(java.lang.Throwable e)
Observable.subscribe(Subscriber) with thrown Throwable.
This is not errors emitted via Observer.onError(Throwable) but exceptions thrown when
attempting to subscribe to a Func1<Subscriber<T>, Subscription>.
e - Throwable thrown by Observable.subscribe(Subscriber)
public <T,R> Observable.Operator<? extends R,? super T> onLift(Observable.Operator<? extends R,? super T> lift)
Observable and the return value is used as the lifted function
This can be used to decorate or replace the Observable.Operator instance or just perform extra
logging, metrics and other such things and pass-thru the onSubscribe.
lift - original Observable.Operator<R, T>
Observable.Operator<R, T> function that can be modified, decorated, replaced or just
returned as a pass-thru
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||