Top Description Methods
com.google.common.util.concurrent

public Interface AsyncFunction<I extends @Nullable Object, O extends @Nullable Object>

Annotations
@GwtCompatible
@FunctionalInterface
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtCompatible, java.util.concurrent.Future, org.checkerframework.checker.nullness.qual.Nullable

Transforms a value, possibly asynchronously. For an example usage and more information, see Futures#transformAsync(ListenableFuture, AsyncFunction, Executor).
Author
Chris Povirk
Since
11.0

Method Summary

Modifier and TypeMethod and Description
public ListenableFuture<O>
apply(I input)

Returns an output Future to use in place of the given input.

Method Detail

applyback to summary
public ListenableFuture<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.