SyncMonoFunctionAccessor

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.

Parameters

function

the synchronous Kotlin function to be invoked

Type Parameters

T

the type of the target object

D

the type of data in the Mono

Constructors

Link copied to clipboard
constructor(function: KFunction<*>)

Functions

Link copied to clipboard
open operator override fun invoke(target: T, args: Array<Any?> = emptyArray<Any?>()): Mono<D>

Invokes the synchronous function and wraps the result in a Mono. Uses Mono.fromCallable to execute the blocking operation on a suitable thread and provide reactive stream compatibility.

Link copied to clipboard
open override fun invoke1(target: T, arg: Any?): Mono<D>