Interface Async.Task<T,R>

Type Parameters:
T - type of the input data
R - type of the result
Enclosing class:
Async<T>
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 static interface Async.Task<T,R>
A task intended to be run asynchronously and outside of the main component context. All data required to complete the task should be passed in as input data, and implementations should be careful not to use any other data from the component during execution.
  • Method Summary

    Modifier and Type
    Method
    Description
    execute(T input)
    Execute the task.
  • Method Details

    • execute

      R execute(T input) throws Exception
      Execute the task. This will run outside of the main component context. All data required to complete the task should be passed in as input. Implementations should not access (or capture) any other data from the component during execution.
      Parameters:
      input - input data for task
      Returns:
      result
      Throws:
      Exception - on task error