Interface ApiAsyncFunction<I,O> (2.18.0)

public interface ApiAsyncFunction<I,O>

Transforms a value, possibly asynchronously.

It is similar to Guava's AsyncFunction, redeclared so that Guava can be shaded.

Type Parameters

NameDescription
I
O

Methods

apply(I input)

public abstract ApiFuture<O> apply(I input)

Returns an output Future to use in place of the given input. The output Future need not be done, making AsyncFunction suitable for asynchronous derivations.

Throwing an exception from this method is equivalent to returning a failing Future.

Parameter
NameDescription
inputI
Returns
TypeDescription
ApiFuture<O>
Exceptions
TypeDescription
Exception