Class RxJavaCompletableExecutionHook
Completable execution with a
default no-op implementation.
See RxJavaPlugins or the RxJava GitHub Wiki for information on configuring plugins:
https://github.com/ReactiveX/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 completable so all behavior should be fast. If anything time-consuming is to be done it should be spawned asynchronously onto separate worker threads.
- Since:
- (if this graduates from Experimental/Beta to supported, replace this parenthetical with the release number)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.Deprecated.onSubscribeStart(Completable completableInstance, Completable.CompletableOnSubscribe onSubscribe) Deprecated.
-
Constructor Details
-
RxJavaCompletableExecutionHook
public RxJavaCompletableExecutionHook()
-
-
Method Details
-
onCreate
@Deprecated public Completable.CompletableOnSubscribe onCreate(Completable.CompletableOnSubscribe f) Deprecated.Invoked during the construction byCompletable.create(Completable.CompletableOnSubscribe)This can be used to decorate or replace the
onSubscribefunction or just perform extra logging, metrics and other such things and pass through the function.- Parameters:
f- originalCompletable.CompletableOnSubscribeinvalid input: '<'T> to be executed- Returns:
Completable.CompletableOnSubscribefunction that can be modified, decorated, replaced or just returned as a pass through
-
onSubscribeStart
@Deprecated public Completable.CompletableOnSubscribe onSubscribeStart(Completable completableInstance, Completable.CompletableOnSubscribe onSubscribe) Deprecated.Invoked beforeCompletable.subscribe(Subscriber)is about to be executed.This can be used to decorate or replace the
onSubscribefunction or just perform extra logging, metrics and other such things and pass through the function.- Parameters:
completableInstance- the target completable instanceonSubscribe- originalCompletable.CompletableOnSubscribeinvalid input: '<'T> to be executed- Returns:
Completable.CompletableOnSubscribeinvalid input: '<'T> function that can be modified, decorated, replaced or just returned as a pass through
-
onSubscribeError
Deprecated.Invoked after failed execution ofCompletable.subscribe(Subscriber)with thrown Throwable.This is not errors emitted via
Observer.onError(Throwable)but exceptions thrown when attempting to subscribe to aFunc1invalid input: '<'Subscriber<T>,Subscription>.- Parameters:
e- Throwable thrown byCompletable.subscribe(Subscriber)- Returns:
- Throwable that can be decorated, replaced or just returned as a pass through
-
onLift
Deprecated.Invoked just as the operator functions is called to bind two operations together into a newCompletableand the return value is used as the lifted functionThis can be used to decorate or replace the
Completable.CompletableOperatorinstance or just perform extra logging, metrics and other such things and pass through the onSubscribe.- Parameters:
lift- originalCompletable.CompletableOperator<R, T>- Returns:
Completable.CompletableOperator<R, T>function that can be modified, decorated, replaced or just returned as a pass through
-