-
- All Implemented Interfaces:
public final class MonoExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> Mono<T>
cast(Mono<?> $self)
Extension for Mono.cast providing a cast<Foo>()
variant.final static <T extends Any, E extends Throwable> Mono<T>
doOnError(Mono<T> $self, KClass<E> exceptionType, Function1<E, Unit> onError)
Extension for Mono.doOnError providing a KClass based variant. final static <T extends Any, E extends Throwable> Mono<T>
onErrorMap(Mono<T> $self, KClass<E> exceptionType, Function1<E, Throwable> mapper)
Extension for Mono.onErrorMap providing a KClass based variant. final static <E extends Throwable, T extends Any> Mono<T>
onErrorMap(Mono<T> $self, KClass<E> type, Function1<E, Boolean> predicate, Function1<E, Throwable> mapper)
Extension for Mono.onErrorMap providing a KClass based variant and predicate. final static <T extends Any> Mono<T>
ofType(Mono<?> $self)
Extension for Mono.ofType providing a ofType<Foo>()
variant.final static <T extends Any, E extends Throwable> Mono<T>
onErrorResume(Mono<T> $self, KClass<E> exceptionType, Function1<E, Mono<T>> fallback)
Extension for Mono.onErrorResume providing a KClass based variant. final static <T extends Any, E extends Throwable> Mono<T>
onErrorReturn(Mono<T> $self, KClass<E> exceptionType, T value)
Extension for Mono.onErrorReturn providing a KClass based variant. final static <T extends Any> Mono<T>
toMono(Publisher<T> $self)
Extension to convert any Publisher of T to a Mono that only emits its first element. final static <T extends Any> Mono<T>
toMono(Function0<T> $self)
Extension to convert any Supplier of T to a Mono that emits supplied element. final static <T extends Any> Mono<T>
toMono(T $self)
Extension for transforming a nullable object to a Mono. final static <T extends Any> Mono<T>
toMono(CompletableFuture<out T> $self)
Extension for transforming an CompletableFuture to a Mono. final static <T extends Any> Mono<T>
toMono(Callable<T> $self)
Extension for transforming an Callable to a Mono. final static <T extends Any> Mono<T>
toMono(Throwable $self)
Extension for transforming an exception to a Mono that completes with the specified error. final static <T extends Any> Mono<T>
switchIfEmpty(Mono<T> $self, Function0<Mono<T>> s)
Extension for Mono.switchIfEmpty accepting a function providing a Mono. -
-
Method Detail
-
cast
final static <T extends Any> Mono<T> cast(Mono<?> $self)
Extension for Mono.cast providing a
cast<Foo>()
variant.
-
doOnError
final static <T extends Any, E extends Throwable> Mono<T> doOnError(Mono<T> $self, KClass<E> exceptionType, Function1<E, Unit> onError)
Extension for Mono.doOnError providing a KClass based variant.
-
onErrorMap
final static <T extends Any, E extends Throwable> Mono<T> onErrorMap(Mono<T> $self, KClass<E> exceptionType, Function1<E, Throwable> mapper)
Extension for Mono.onErrorMap providing a KClass based variant.
-
onErrorMap
final static <E extends Throwable, T extends Any> Mono<T> onErrorMap(Mono<T> $self, KClass<E> type, Function1<E, Boolean> predicate, Function1<E, Throwable> mapper)
Extension for Mono.onErrorMap providing a KClass based variant and predicate.
-
ofType
final static <T extends Any> Mono<T> ofType(Mono<?> $self)
Extension for Mono.ofType providing a
ofType<Foo>()
variant.
-
onErrorResume
final static <T extends Any, E extends Throwable> Mono<T> onErrorResume(Mono<T> $self, KClass<E> exceptionType, Function1<E, Mono<T>> fallback)
Extension for Mono.onErrorResume providing a KClass based variant.
-
onErrorReturn
final static <T extends Any, E extends Throwable> Mono<T> onErrorReturn(Mono<T> $self, KClass<E> exceptionType, T value)
Extension for Mono.onErrorReturn providing a KClass based variant.
-
toMono
final static <T extends Any> Mono<T> toMono(T $self)
Extension for transforming a nullable object to a Mono.
-
toMono
final static <T extends Any> Mono<T> toMono(CompletableFuture<out T> $self)
Extension for transforming an CompletableFuture to a Mono.
-
toMono
final static <T extends Any> Mono<T> toMono(Throwable $self)
Extension for transforming an exception to a Mono that completes with the specified error.
-
switchIfEmpty
final static <T extends Any> Mono<T> switchIfEmpty(Mono<T> $self, Function0<Mono<T>> s)
Extension for Mono.switchIfEmpty accepting a function providing a Mono. This allows having a deferred execution with the switchIfEmpty operator
-
-
-
-