Package com.google.api.core
Interface ApiAsyncFunction<I,O>
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ApiAsyncFunction<I,O>
Transforms a value, possibly asynchronously.It is similar to Guava's
AsyncFunction
, redeclared so that Guava can be shaded.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ApiFuture<O>
apply(I input)
Returns an output Future to use in place of the given input.
-
-
-
Method Detail
-
apply
ApiFuture<O> apply(I input) throws Exception
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.
- Throws:
Exception
-
-