tuweni / 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 - Supplier<out U>!: The function to use to compute the value of the returned result.

- The function's return type.

Return
AsyncResult<U>!: 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 - Vertx!: The vertx context.

supplier - Supplier<out U>!: The function to use to compute the value of the returned result.

- The function's return type.

Return
AsyncResult<U>!: A new result.