FluxMonoFunctionAccessor

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.

Parameters

T

the type of the target object

D

the type of individual items in the Flux

Constructors

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

Properties

Link copied to clipboard
open override val function: KFunction<*>

the Kotlin function that returns a Flux

Link copied to clipboard
open val method: Method

The underlying Java Method object for this function. This method is guaranteed to be non-null for accessible functions.

Link copied to clipboard
open override val name: String

The name of the function, inherited from the Named interface. Returns the simple name of the underlying Kotlin function.

Link copied to clipboard
open val targetType: Class<T>

The Java Class representing the type of the target object. This is derived from the declaring class of the function.

Functions

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

Invokes the function that returns a Flux and collects all emitted items into a List. Uses Mono.defer for lazy evaluation and collectList() to aggregate the Flux emissions.