@GwtCompatible @FunctionalInterface public interface AsyncFunction<I,O>
Futures.transformAsync(ListenableFuture, AsyncFunction, Executor)
.Modifier and Type | Method and Description |
---|---|
ListenableFuture<O> |
apply(I input)
Returns an output
Future to use in place of the given input . |
ListenableFuture<O> apply(@NullableDecl I input) throws Exception
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
.
Exception
Copyright © 2010–2017. All rights reserved.