Interface AsyncFunction<I,O>
-
public interface AsyncFunction<I,O>
Transforms a value, possibly asynchronously. For an example usage and more information, seeFutures.transform(ListenableFuture, AsyncFunction)
.- Since:
- 11.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ListenableFuture<O>
apply(I input)
Returns an outputFuture
to use in place of the giveninput
.
-
-
-
Method Detail
-
apply
ListenableFuture<O> apply(I input) throws java.lang.Exception
Returns an outputFuture
to use in place of the giveninput
. The outputFuture
need not be done, makingAsyncFunction
suitable for asynchronous derivations.Throwing an exception from this method is equivalent to returning a failing
Future
.- Throws:
java.lang.Exception
-
-