public interface Task<T> extends Callable<T>
| Modifier and Type | Method and Description |
|---|---|
void |
background(TaskListener listener)
Run the task in a separate thread.
|
void |
cancel()
Mark the task as canceled.
|
T |
getResult()
Retrieve the result of the task.
|
TaskStatus |
getStatus()
Retrieve the status of the task.
|
default void |
setParameter(String param) |
default void |
setParameters(String parameters) |
default void |
setParameters(String[] parameters) |
T getResult()
call() to run and retrieve.TaskStatus getStatus()
void cancel()
void background(TaskListener listener)
listener - will be notified when the task is donedefault void setParameter(String param)
default void setParameters(String[] parameters)
default void setParameters(String parameters)
Copyright © 2012–2020. All rights reserved.