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


@GwtCompatible public interface AsyncFunction<I extends @Nullable Object,O extends @Nullable Object>
Transforms a value, possibly asynchronously. For an example usage and more information, see Futures.transformAsync(ListenableFuture, AsyncFunction, Executor).
Since:
11.0
Author:
Chris Povirk
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(I input)
    Returns an output Future to use in place of the given input.
  • Method Details

    • apply

      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