SimpleMonoFunctionAccessor

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.

Parameters

function

the Kotlin function that returns a Mono

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 override fun invoke(target: T, args: Array<Any?> = emptyArray<Any?>()): Mono<D>

Invokes the function and returns its Mono result, wrapped in Mono.defer for proper lazy evaluation. The defer operator ensures that the function is only executed when the Mono is subscribed to.

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