-
- Type Parameters:
T
- type of the input dataR
- type of the result
- 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description R
execute(T input)
Execute the task.
-
-
-
Method Detail
-
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
-
-