concurrent / org.apache.tuweni.concurrent / AsyncCompletion / thenSupply

thenSupply

abstract fun <U : Any> thenSupply(supplier: Supplier<out U>): AsyncResult<U> (source)

Returns a completion that, when this result completes normally, completes with the value obtained after executing the supplied function.

Parameters

supplier - The function to use to compute the value of the returned result.

- The function's return type.

Return
A new result.

abstract fun <U : Any> thenSupply(vertx: Vertx, supplier: Supplier<out U>): AsyncResult<U> (source)

Returns a completion that, when this result completes normally, completes with the value obtained after executing the supplied function on the vertx context.

Parameters

vertx - The vertx context.

supplier - The function to use to compute the value of the returned result.

- The function's return type.

Return
A new result.