The class features a lockdown state, see lockdown() and isLockdown(), to
prevent further changes to the hooks.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static volatile boolean | lockdown
Prevents changing the hook callbacks when set to true. |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func2 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Action1 | |
| pack-priv static volatile Func0 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func2 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func1 | |
| pack-priv static volatile Func2 | |
| pack-priv static volatile Func1 |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | clear()
Clears all hooks to be no-op (and pass-through) and onError hook to signal errors to the caller thread's UncaughtExceptionHandler. |
| public static void | |
| public static void | enableAssemblyTracking()
Sets up hooks that capture the current stacktrace when a source or an operator is instantiated, keeping it in a field for debugging purposes and alters exceptions passing along to hold onto this stacktrace. |
| public static Func1 | Returns: the current hook functionReturns the current Completable onCreate hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current Completable onLift hook function or null if it is set to the default pass-through. |
| public static Func2 | Returns: the current hook functionReturns the current Completable onStart hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current Completable onSubscribeError hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current computation scheduler hook function or null if it is set to the default pass-through. |
| public static Action1 | Returns: the current hook actionReturns the current global error handler hook action or null if it is set to the default one that signals errors to the current threads UncaughtExceptionHandler. |
| public static Func0 | Returns: the current factory functionReturns the current factory for creating ScheduledExecutorServices in GenericScheduledExecutorService utility. |
| public static Func1 | Returns: the current hook functionReturns the current io scheduler hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current new thread scheduler hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current Observable onCreate hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current Observable onLift hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current Observable onReturn hook function or null if it is set to the default pass-through. |
| public static Func2 | Returns: the current hook functionReturns the current Observable onStart hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current Observable onSubscribeError hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current schedule action hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current Single onCreate hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current Single onLift hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current Single onReturn hook function or null if it is set to the default pass-through. |
| public static Func2 | Returns: the current hook functionReturns the current Single onStart hook function or null if it is set to the default pass-through. |
| public static Func1 | Returns: the current hook functionReturns the current Single onSubscribeError hook function or null if it is set to the default pass-through. |
| pack-priv static void | |
| pack-priv static void | |
| public static boolean | Returns: true if the hooks can no longer be changedReturns true if the hooks can no longer be changed. |
| public static void | |
| public static Throwable | Returns: the original error or alternative Throwable to be thrownthe error error)Hook to call if the Completable.subscribe() crashes for some reason. |
| public static < the input value type T, the output value type R> Completable. | Returns: the original or alternative operator that will be subscribed tothe original operator operatorHook to call before the child subscriber would subscribe to an Operator. |
| public static < the value type T> Completable. | Returns: the original or alternative action that will be subscribed tothe parent Completable instance instance, Completable.the original OnSubscribe action onSubscribeHook to call before the child subscriber is subscribed to the OnSubscribe action. |
| public static Scheduler | Returns: the default of alternative schedulerthe default computation scheduler scheduler)Hook to call when the Schedulers.computation() is called. |
| public static < the value type T> Observable. | Returns: the original or replacement OnSubscribe instancethe original OnSubscribe logic onSubscribeHook to call when an Observable is created. |
| public static < the value type T> Single. | Returns: the original or replacement OnSubscribe instancethe original OnSubscribe logic onSubscribeHook to call when a Single is created. |
| public static Completable. | Returns: the original or replacement OnSubscribe instancethe original OnSubscribe logic onSubscribeHook to call when a Completable is created. |
| public static void | |
| public static Scheduler | Returns: the default of alternative schedulerthe default io scheduler scheduler)Hook to call when the Schedulers.io() is called. |
| public static Scheduler | Returns: the default of alternative schedulerthe default new thread scheduler scheduler)Hook to call when the Schedulers.newThread() is called. |
| public static Throwable | Returns: the original error or alternative Throwable to be thrownthe error error)Hook to call if the Observable.subscribe() crashes for some reason. |
| public static < the input value type T, the output value type R> Observable. | Returns: the original or alternative operator that will be subscribed tothe original operator operatorHook to call before the child subscriber would subscribe to an Operator. |
| public static Subscription | Returns: the original or alternative subscription that will be returnedthe original subscription subscription)Hook to call before the Observable.subscribe() method is about to return a Subscription. |
| public static < the value type T> Observable. | Returns: the original or alternative action that will be subscribed tothe parent Observable instance instance, Observable.the original OnSubscribe action onSubscribeHook to call before the child subscriber is subscribed to the OnSubscribe action. |
| public static Action0 | Returns: the original or alternative actionthe original action action)Hook to call before the action is scheduled, allows decorating the original action. |
| public static Throwable | Returns: the original error or alternative Throwable to be thrownthe error error)Hook to call if the Single.subscribe() crashes for some reason. |
| public static < the input value type T, the output value type R> Observable. | Returns: the original or alternative operator that will be subscribed tothe original operator operatorHook to call before the child subscriber would subscribe to an Operator. |
| public static Subscription | Returns: the original or alternative subscription that will be returnedthe original subscription subscription)Hook to call before the Single.subscribe() method is about to return a Subscription. |
| public static < the value type T> Single. | Returns: the original or alternative action that will be subscribed tothe parent Single instance instance, Single.the original OnSubscribe action onSubscribeHook to call before the child subscriber is subscribed to the OnSubscribe action. |
| public static void | |
| public static void | resetAssemblyTracking()
Resets the assembly tracking hooks to their default delegates to RxJavaPlugins. |
| public static void | setOnCompletableCreate(Func1<Completable.
the function that takes the original CompletableOnSubscribe
and should return a CompletableOnSubscribe. onCompletableCreateSets the Completable's onCreate hook function unless a lockdown is in effect. |
| public static void | setOnCompletableLift(Func1<Completable.
the function that is called with original Operator and should
return an Operator instance. onCompletableLiftSets a hook function that is called with an operator when a Completable operator built with lift() gets subscribed to. |
| public static void | setOnCompletableStart(Func2<Completable, Completable.
the function that is called with the current Completable instance,
its CompletableOnSubscribe function and should return a CompletableOnSubscribe function
that gets actually subscribed to. onCompletableStartSets the hook function that is called when a subscriber subscribes to a Completable unless a lockdown is in effect. |
| public static void | setOnCompletableSubscribeError(Func1<Throwable, Throwable>
the function that is called with the crash exception and should return
an exception. onCompletableSubscribeError)Sets a hook function that is called when the Completable.subscribe() call fails with an exception. |
| public static void | setOnComputationScheduler(Func1<Scheduler, Scheduler>
the function that receives the original computation scheduler
and should return a scheduler. onComputationScheduler)Sets the hook function for returning a scheduler when the Schedulers.computation() is called unless a lockdown is in effect. |
| public static void | setOnError(Action1<Throwable>
the action that will receive undeliverable Throwables onError)Sets the global error consumer action unless a lockdown is in effect. |
| public static void | setOnGenericScheduledExecutorService(Func0<? extends ScheduledExecutorService>
the supplier that is called when the GenericScheduledExecutorService
is (re)started factory)Sets the hook function for returning a ScheduledExecutorService used by the GenericScheduledExecutorService for background tasks. |
| public static void | setOnIOScheduler(Func1<Scheduler, Scheduler>
the function that receives the original io scheduler
and should return a scheduler. onIOScheduler)Sets the hook function for returning a scheduler when the Schedulers.io() is called unless a lockdown is in effect. |
| public static void | setOnNewThreadScheduler(Func1<Scheduler, Scheduler>
the function that receives the original new thread scheduler
and should return a scheduler. onNewThreadScheduler)Sets the hook function for returning a scheduler when the Schedulers.newThread() is called unless a lockdown is in effect. |
| public static void | setOnObservableCreate(Func1<Observable.
the function that takes the original OnSubscribe
and should return a OnSubscribe. onObservableCreateSets the Observable onCreate hook function unless a lockdown is in effect. |
| public static void | setOnObservableLift(Func1<Observable.
the function that is called with original Operator and should
return an Operator instance. onObservableLiftSets a hook function that is called with an operator when an Observable operator built with lift() gets subscribed to. |
| public static void | setOnObservableReturn(Func1<Subscription, Subscription>
the function that is called with the Subscriber that has been
subscribed to the OnSubscribe function and returns a Subscription that will be returned by
subscribe(). onObservableReturn)Sets a hook function that is called when the Observable.subscribe() call is about to return a Subscription unless a lockdown is in effect. |
| public static void | setOnObservableStart(Func2<Observable<T>, Observable.
the function that is called with the current Observable instance,
its OnSubscribe function and should return a OnSubscribe function
that gets actually subscribed to. onObservableStartSets the hook function that is called when a subscriber subscribes to a Observable unless a lockdown is in effect. |
| public static void | setOnObservableSubscribeError(Func1<Throwable, Throwable>
the function that is called with the crash exception and should return
an exception. onObservableSubscribeError)Sets a hook function that is called when the Observable.subscribe() call fails with an exception. |
| public static void | setOnScheduleAction(Func1<Action0, Action0>
the function that receives the original action and should
return an Action0. onScheduleAction)Sets the hook function that is called before an action is scheduled, allowing decorating that function, unless a lockdown is in effect. |
| public static void | setOnSingleCreate(Func1<Single.
the function that takes the original OnSubscribe
and should return a OnSubscribe. onSingleCreateSets the Single onCreate hook function unless a lockdown is in effect. |
| public static void | setOnSingleLift(Func1<Observable.
the function that is called with original Operator and should
return an Operator instance. onSingleLiftSets a hook function that is called with an operator when an Single operator built with lift() gets subscribed to. |
| public static void | setOnSingleReturn(Func1<Subscription, Subscription>
the function that is called with the SingleSubscriber that has been
subscribed to the OnSubscribe function and returns a Subscription that will be returned by
subscribe(). onSingleReturn)Sets a hook function that is called when the Single.subscribe() call is about to return a Subscription unless a lockdown is in effect. |
| public static void | setOnSingleStart(Func2<Single<T>, Single.
the function that is called with the current Single instance,
its OnSubscribe function and should return a OnSubscribe function
that gets actually subscribed to. onSingleStartSets the hook function that is called when a subscriber subscribes to a Single unless a lockdown is in effect. |
| public static void | setOnSingleSubscribeError(Func1<Throwable, Throwable>
the function that is called with the crash exception and should return
an exception. onSingleSubscribeError)Sets a hook function that is called when the Single.subscribe() call fails with an exception. |
| pack-priv static void |