public abstract class AbstractTask<T> extends AbstractFuture<T> implements EvalTask<T>
EvalTasks.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTask()
Initialize a command with no name.
|
protected |
AbstractTask(String name)
Initialize a command.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Execute the task.
|
String |
getName()
Get the task's name.
|
EvalProject |
getProject() |
protected abstract T |
perform() |
AbstractTask<T> |
setName(String name)
Set this command's name.
|
AbstractTask<T> |
setProject(EvalProject ep)
Set the project this task is a member of.
|
addListener, cancel, get, get, interruptTask, isCancelled, isDone, set, setException, wasInterruptedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListenerpublic AbstractTask<T> setProject(@Nonnull EvalProject ep)
ep - The eval project.@Nonnull public EvalProject getProject()
public AbstractTask<T> setName(@Nullable String name)
name - The new name.public void execute()
throws TaskExecutionException
perform(), exposing the return value (or exception)
as the task's value.execute in interface EvalTask<T>TaskExecutionException - if there is an error performing the task.protected abstract T perform() throws TaskExecutionException, InterruptedException