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
onSubscribe
function or just perform extra logging, metrics and other such things and pass through the function.- Parameters:
f
- originalCompletable.CompletableOnSubscribe
invalid input: '<'T
> to be executed- Returns:
Completable.CompletableOnSubscribe
function 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
onSubscribe
function or just perform extra logging, metrics and other such things and pass through the function.- Parameters:
completableInstance
- the target completable instanceonSubscribe
- originalCompletable.CompletableOnSubscribe
invalid input: '<'T
> to be executed- Returns:
Completable.CompletableOnSubscribe
invalid 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 aFunc1
invalid 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 newCompletable
and the return value is used as the lifted functionThis can be used to decorate or replace the
Completable.CompletableOperator
instance 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
-