Package-level declarations

Types

Link copied to clipboard
class BlockingMonoFunctionAccessor<T, D>(monoFunctionAccessor: MonoFunctionAccessor<T, Mono<D>>, scheduler: Scheduler = Schedulers.boundedElastic()) : MonoFunctionAccessor<T, Mono<D>>

MonoFunctionAccessor wrapper that handles blocking operations by scheduling them on a separate thread. This accessor is used for functions annotated with @Blocking to ensure they don't block the reactive event loop. It automatically switches to a bounded elastic scheduler when running on a non-blocking thread.

Link copied to clipboard
data class FluxMonoFunctionAccessor<T, D>(val function: KFunction<*>) : MonoFunctionAccessor<T, Mono<List<D>>>

MonoFunctionAccessor for functions that return Flux streams. This accessor converts Flux results to Mono> by collecting all emitted items into a list, providing a way to handle multi-value reactive streams in a Mono context.

Link copied to clipboard
interface MonoFunctionAccessor<T, out R : Mono<*>> : ReactiveFunctionAccessor<T, R>

Interface for accessing functions that return Mono reactive streams. Specializes ReactiveFunctionAccessor for Mono-specific operations, providing type safety for single-value reactive returns.

Link copied to clipboard

Factory object for creating MonoFunctionAccessor instances based on function return types. Automatically determines the appropriate accessor implementation based on the function's return type and any blocking annotations.

Link copied to clipboard
data class PublisherMonoFunctionAccessor<T, D>(val function: KFunction<*>) : MonoFunctionAccessor<T, Mono<D>>

MonoFunctionAccessor for functions that return Publisher streams. This accessor converts Publisher results to Mono by taking the first emitted item, providing compatibility with the Reactive Streams specification.

Link copied to clipboard
interface ReactiveFunctionAccessor<T, out R : Publisher<*>> : FunctionAccessor<T, R>

Interface for accessing reactive functions that return Publisher-based types. Extends FunctionAccessor to provide reactive stream support for functions that return reactive types like Flux, Mono, or other Publisher implementations.

Link copied to clipboard
data class SimpleMonoFunctionAccessor<T, D>(val function: KFunction<*>) : MonoFunctionAccessor<T, Mono<D>>

Simple implementation of MonoFunctionAccessor for functions that already return Mono. This accessor defers the execution of the underlying function to ensure proper reactive stream behavior and lazy evaluation.

Link copied to clipboard
data class SyncMonoFunctionAccessor<T, D>(val function: KFunction<*>) : MonoFunctionAccessor<T, Mono<D>>

MonoFunctionAccessor for synchronous functions that don't return reactive types. This accessor wraps synchronous function calls in Mono.fromCallable to provide reactive stream compatibility while executing the function on a blocking thread.

Functions

Link copied to clipboard
fun <T> Mono<T>.toBlockable(scheduler: Scheduler = Schedulers.boundedElastic()): Mono<T>

Extension function that makes a Mono blockable by scheduling it on a separate thread if needed. If the current thread is non-blocking (reactive), it subscribes the Mono on the provided scheduler. If already on a blocking thread, returns the Mono unchanged.

Link copied to clipboard

Extension function that converts a Kotlin function to a MonoFunctionAccessor. Provides a convenient way to create accessors for functions that should return Mono streams.