PublisherMonoFunctionAccessor

MonoFunctionAccessor for functions that return Publisher streams. This accessor converts Publisher results to a Mono that contains all emitted items as a List.

Parameters

function

the Kotlin function that returns a Publisher

Type Parameters

T

the type of the target object

D

the type of data in the Publisher

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 function that returns a Publisher and converts it to a Mono. Uses Mono.defer for lazy evaluation and collectList() to aggregate the Publisher emissions.

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