Package com.reborn.tasks
Class ValueTask<T>
- java.lang.Object
-
- com.reborn.tasks.BaseTask<T>
-
- com.reborn.tasks.ValueTask<T>
-
- All Implemented Interfaces:
ICancelable,ITask,IValueTask<T>
public class ValueTask<T> extends BaseTask<T>
-
-
Field Summary
-
Fields inherited from class com.reborn.tasks.BaseTask
_exception, _onComplete, _onError, _onSuccess, _onUpdate, _preExecute, _state
-
-
Constructor Summary
Constructors Constructor Description ValueTask(ThrowingFunction<ITaskOperator,T> callable, ITaskExecutor taskExecutor)ValueTask(T result, ITaskExecutor taskExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ITaskOperatorcreateTaskOperator(java.util.function.Consumer<java.lang.Object> onUpdate)ICancelableexecute()TgetResult()-
Methods inherited from class com.reborn.tasks.BaseTask
cancel, checkForValidState, getException, getState, isCanceled, onComplete, onError, onExecuted, onResultErrored, onResultSucceeded, onSuccess, onUpdate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.reborn.tasks.ITask
onComplete, onError, onUpdate
-
Methods inherited from interface com.reborn.tasks.IValueTask
onComplete, onSuccess
-
-
-
-
Constructor Detail
-
ValueTask
public ValueTask(ThrowingFunction<ITaskOperator,T> callable, ITaskExecutor taskExecutor)
-
ValueTask
public ValueTask(T result, ITaskExecutor taskExecutor)
-
-
Method Detail
-
createTaskOperator
protected ITaskOperator createTaskOperator(java.util.function.Consumer<java.lang.Object> onUpdate)
-
getResult
public T getResult()
-
execute
public ICancelable execute()
-
-