Class RxJavaCompletableExecutionHook
- java.lang.Object
-
- rx.plugins.RxJavaCompletableExecutionHook
-
@Experimental public abstract class RxJavaCompletableExecutionHook extends java.lang.Object
Abstract ExecutionHook with invocations at different lifecycle points ofCompletable
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 Constructor Description RxJavaCompletableExecutionHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Completable.CompletableOnSubscribe
onCreate(Completable.CompletableOnSubscribe f)
Deprecated.Completable.CompletableOperator
onLift(Completable.CompletableOperator lift)
Deprecated.java.lang.Throwable
onSubscribeError(java.lang.Throwable e)
Deprecated.Completable.CompletableOnSubscribe
onSubscribeStart(Completable completableInstance, Completable.CompletableOnSubscribe onSubscribe)
Deprecated.
-
-
-
Method Detail
-
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
<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
<T
> to be executed- Returns:
Completable.CompletableOnSubscribe
<T
> function that can be modified, decorated, replaced or just returned as a pass through
-
onSubscribeError
@Deprecated public java.lang.Throwable onSubscribeError(java.lang.Throwable e)
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
<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 public Completable.CompletableOperator onLift(Completable.CompletableOperator lift)
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
-
-