public final class RxJavaObservablePlugins
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static io.reactivex.common.Scheduler |
createComputationScheduler(java.util.concurrent.ThreadFactory threadFactory)
Create an instance of the default
Scheduler used for Schedulers.computation()
except using threadFactory for thread creation. |
static io.reactivex.common.Scheduler |
createIoScheduler(java.util.concurrent.ThreadFactory threadFactory)
Create an instance of the default
Scheduler used for Schedulers.io()
except using threadFactory for thread creation. |
static io.reactivex.common.Scheduler |
createNewThreadScheduler(java.util.concurrent.ThreadFactory threadFactory)
Create an instance of the default
Scheduler used for Schedulers.newThread()
except using threadFactory for thread creation. |
static io.reactivex.common.Scheduler |
createSingleScheduler(java.util.concurrent.ThreadFactory threadFactory)
Create an instance of the default
Scheduler used for Schedulers.single()
except using threadFactory for thread creation. |
static io.reactivex.common.functions.Function<? super Completable,? extends Completable> |
getOnCompletableAssembly()
Returns the current hook function.
|
static io.reactivex.common.functions.BiFunction<? super Completable,? super CompletableObserver,? extends CompletableObserver> |
getOnCompletableSubscribe()
Returns the current hook function.
|
static io.reactivex.common.functions.Function<? super ConnectableObservable,? extends ConnectableObservable> |
getOnConnectableObservableAssembly()
Returns the current hook function.
|
static io.reactivex.common.functions.Function<? super Maybe,? extends Maybe> |
getOnMaybeAssembly()
Returns the current hook function.
|
static io.reactivex.common.functions.BiFunction<? super Maybe,? super MaybeObserver,? extends MaybeObserver> |
getOnMaybeSubscribe()
Returns the current hook function.
|
static io.reactivex.common.functions.Function<? super Observable,? extends Observable> |
getOnObservableAssembly()
Returns the current hook function.
|
static io.reactivex.common.functions.BiFunction<? super Observable,? super Observer,? extends Observer> |
getOnObservableSubscribe()
Returns the current hook function.
|
static io.reactivex.common.functions.Function<? super Single,? extends Single> |
getOnSingleAssembly()
Returns the current hook function.
|
static io.reactivex.common.functions.BiFunction<? super Single,? super SingleObserver,? extends SingleObserver> |
getOnSingleSubscribe()
Returns the current hook function.
|
static boolean |
isLockdown()
Returns true if the plugins were locked down.
|
static void |
lockdown()
Prevents changing the plugins from then on.
|
static Completable |
onAssembly(Completable source)
Calls the associated hook function.
|
static <T> ConnectableObservable<T> |
onAssembly(ConnectableObservable<T> source)
Calls the associated hook function.
|
static <T> Maybe<T> |
onAssembly(Maybe<T> source)
Calls the associated hook function.
|
static <T> Observable<T> |
onAssembly(Observable<T> source)
Calls the associated hook function.
|
static <T> Single<T> |
onAssembly(Single<T> source)
Calls the associated hook function.
|
static CompletableObserver |
onSubscribe(Completable source,
CompletableObserver observer)
Calls the associated hook function.
|
static <T> MaybeObserver<? super T> |
onSubscribe(Maybe<T> source,
MaybeObserver<? super T> subscriber)
Calls the associated hook function.
|
static <T> Observer<? super T> |
onSubscribe(Observable<T> source,
Observer<? super T> observer)
Calls the associated hook function.
|
static <T> SingleObserver<? super T> |
onSubscribe(Single<T> source,
SingleObserver<? super T> observer)
Calls the associated hook function.
|
static void |
reset()
Removes all handlers and resets to default behavior.
|
static void |
setOnCompletableAssembly(io.reactivex.common.functions.Function<? super Completable,? extends Completable> onCompletableAssembly)
Sets the specific hook function.
|
static void |
setOnCompletableSubscribe(io.reactivex.common.functions.BiFunction<? super Completable,? super CompletableObserver,? extends CompletableObserver> onCompletableSubscribe)
Sets the specific hook function.
|
static void |
setOnConnectableObservableAssembly(io.reactivex.common.functions.Function<? super ConnectableObservable,? extends ConnectableObservable> onConnectableObservableAssembly)
Sets the specific hook function.
|
static void |
setOnMaybeAssembly(io.reactivex.common.functions.Function<? super Maybe,? extends Maybe> onMaybeAssembly)
Sets the specific hook function.
|
static void |
setOnMaybeSubscribe(io.reactivex.common.functions.BiFunction<? super Maybe,MaybeObserver,? extends MaybeObserver> onMaybeSubscribe)
Sets the specific hook function.
|
static void |
setOnObservableAssembly(io.reactivex.common.functions.Function<? super Observable,? extends Observable> onObservableAssembly)
Sets the specific hook function.
|
static void |
setOnObservableSubscribe(io.reactivex.common.functions.BiFunction<? super Observable,? super Observer,? extends Observer> onObservableSubscribe)
Sets the specific hook function.
|
static void |
setOnSingleAssembly(io.reactivex.common.functions.Function<? super Single,? extends Single> onSingleAssembly)
Sets the specific hook function.
|
static void |
setOnSingleSubscribe(io.reactivex.common.functions.BiFunction<? super Single,? super SingleObserver,? extends SingleObserver> onSingleSubscribe)
Sets the specific hook function.
|
public static void lockdown()
This allows container-like environments to prevent clients messing with plugins.
public static boolean isLockdown()
public static void reset()
@Nullable public static io.reactivex.common.functions.Function<? super Completable,? extends Completable> getOnCompletableAssembly()
@Nullable public static io.reactivex.common.functions.BiFunction<? super Completable,? super CompletableObserver,? extends CompletableObserver> getOnCompletableSubscribe()
@Nullable public static io.reactivex.common.functions.BiFunction<? super Maybe,? super MaybeObserver,? extends MaybeObserver> getOnMaybeSubscribe()
@Nullable public static io.reactivex.common.functions.Function<? super Maybe,? extends Maybe> getOnMaybeAssembly()
@Nullable public static io.reactivex.common.functions.Function<? super Single,? extends Single> getOnSingleAssembly()
@Nullable public static io.reactivex.common.functions.BiFunction<? super Single,? super SingleObserver,? extends SingleObserver> getOnSingleSubscribe()
@Nullable public static io.reactivex.common.functions.Function<? super Observable,? extends Observable> getOnObservableAssembly()
@Nullable public static io.reactivex.common.functions.Function<? super ConnectableObservable,? extends ConnectableObservable> getOnConnectableObservableAssembly()
@Nullable public static io.reactivex.common.functions.BiFunction<? super Observable,? super Observer,? extends Observer> getOnObservableSubscribe()
public static void setOnCompletableAssembly(@Nullable
io.reactivex.common.functions.Function<? super Completable,? extends Completable> onCompletableAssembly)
onCompletableAssembly - the hook function to set, null allowedpublic static void setOnCompletableSubscribe(@Nullable
io.reactivex.common.functions.BiFunction<? super Completable,? super CompletableObserver,? extends CompletableObserver> onCompletableSubscribe)
onCompletableSubscribe - the hook function to set, null allowedpublic static void setOnMaybeAssembly(@Nullable
io.reactivex.common.functions.Function<? super Maybe,? extends Maybe> onMaybeAssembly)
onMaybeAssembly - the hook function to set, null allowedpublic static void setOnMaybeSubscribe(@Nullable
io.reactivex.common.functions.BiFunction<? super Maybe,MaybeObserver,? extends MaybeObserver> onMaybeSubscribe)
onMaybeSubscribe - the hook function to set, null allowedpublic static void setOnObservableAssembly(@Nullable
io.reactivex.common.functions.Function<? super Observable,? extends Observable> onObservableAssembly)
onObservableAssembly - the hook function to set, null allowedpublic static void setOnConnectableObservableAssembly(@Nullable
io.reactivex.common.functions.Function<? super ConnectableObservable,? extends ConnectableObservable> onConnectableObservableAssembly)
onConnectableObservableAssembly - the hook function to set, null allowedpublic static void setOnObservableSubscribe(@Nullable
io.reactivex.common.functions.BiFunction<? super Observable,? super Observer,? extends Observer> onObservableSubscribe)
onObservableSubscribe - the hook function to set, null allowedpublic static void setOnSingleAssembly(@Nullable
io.reactivex.common.functions.Function<? super Single,? extends Single> onSingleAssembly)
onSingleAssembly - the hook function to set, null allowedpublic static void setOnSingleSubscribe(@Nullable
io.reactivex.common.functions.BiFunction<? super Single,? super SingleObserver,? extends SingleObserver> onSingleSubscribe)
onSingleSubscribe - the hook function to set, null allowed@NonNull public static <T> Observer<? super T> onSubscribe(@NonNull Observable<T> source, @NonNull Observer<? super T> observer)
T - the value typesource - the hook's input valueobserver - the observer@NonNull public static <T> SingleObserver<? super T> onSubscribe(@NonNull Single<T> source, @NonNull SingleObserver<? super T> observer)
T - the value typesource - the hook's input valueobserver - the observer@NonNull public static CompletableObserver onSubscribe(@NonNull Completable source, @NonNull CompletableObserver observer)
source - the hook's input valueobserver - the observer@NonNull public static <T> MaybeObserver<? super T> onSubscribe(@NonNull Maybe<T> source, @NonNull MaybeObserver<? super T> subscriber)
T - the value typesource - the hook's input valuesubscriber - the subscriber@NonNull public static <T> Maybe<T> onAssembly(@NonNull Maybe<T> source)
T - the value typesource - the hook's input value@NonNull public static <T> Observable<T> onAssembly(@NonNull Observable<T> source)
T - the value typesource - the hook's input value@NonNull public static <T> ConnectableObservable<T> onAssembly(@NonNull ConnectableObservable<T> source)
T - the value typesource - the hook's input value@NonNull public static <T> Single<T> onAssembly(@NonNull Single<T> source)
T - the value typesource - the hook's input value@NonNull public static Completable onAssembly(@NonNull Completable source)
source - the hook's input value@NonNull
public static io.reactivex.common.Scheduler createComputationScheduler(@NonNull
java.util.concurrent.ThreadFactory threadFactory)
Scheduler used for Schedulers.computation()
except using threadFactory for thread creation.threadFactory - thread factory to use for creating worker threads. Note that this takes precedence over any
system properties for configuring new thread creation. Cannot be null.@NonNull
public static io.reactivex.common.Scheduler createIoScheduler(@NonNull
java.util.concurrent.ThreadFactory threadFactory)
Scheduler used for Schedulers.io()
except using threadFactory for thread creation.threadFactory - thread factory to use for creating worker threads. Note that this takes precedence over any
system properties for configuring new thread creation. Cannot be null.@NonNull
public static io.reactivex.common.Scheduler createNewThreadScheduler(@NonNull
java.util.concurrent.ThreadFactory threadFactory)
Scheduler used for Schedulers.newThread()
except using threadFactory for thread creation.threadFactory - thread factory to use for creating worker threads. Note that this takes precedence over any
system properties for configuring new thread creation. Cannot be null.@NonNull
public static io.reactivex.common.Scheduler createSingleScheduler(@NonNull
java.util.concurrent.ThreadFactory threadFactory)
Scheduler used for Schedulers.single()
except using threadFactory for thread creation.threadFactory - thread factory to use for creating worker threads. Note that this takes precedence over any
system properties for configuring new thread creation. Cannot be null.