@FunctionalInterface
public interface Task
run.
The Task interface is similar to Runnable,
in that both are designed for classes whose instances are potentially
executed by another thread.
A Runnable however can not throw a checked exception.
The class is intended to be use with custom executor wrappers Runner and MonitoringTaskSubmitter.
Runner,
MonitoringTaskSubmitter| Modifier and Type | Method and Description |
|---|---|
void |
run()
Executes a task or throws an exception if unable to do so.
|
void run() throws java.lang.Exception
java.lang.Exception - if unable to execute taskRunner,
MonitoringTaskSubmitter