V
- the result type returned by this ERXFutureTask's get methodpublic class ERXFutureTask<V> extends FutureTask<V> implements IERXExecutionStateTransition, IERXStatus, IERXPercentComplete, NSKeyValueCoding
IERXStatus
, IERXPercentComplete
and
NSKeyValueCoding
. Additional methods are provided in this FutureTask for checking
if those interfaces are implemented in the wrapped task and if so the values are passed thru
from the task.
Usage:
// If null, then submit the callable task ERXFutureTask _future = new ERXFutureTask(callable); ERXExecutorService.executorService().execute(_future);
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
_CLASS, NullValue
Constructor and Description |
---|
ERXFutureTask(Callable<V> callable) |
ERXFutureTask(Runnable runnable,
V result) |
Modifier and Type | Method and Description |
---|---|
void |
afterExecute()
Method invoked upon completion of execution of the given Runnable/Callable.
|
void |
beforeExecute()
Method invoked prior to executing the given Runnable/Callable.
|
boolean |
hasPercentComplete() |
boolean |
hasStatus() |
boolean |
isStoppable() |
Double |
percentComplete() |
String |
status() |
void |
takeValueForKey(Object value,
String key) |
Object |
task() |
String |
toString() |
Object |
valueForKey(String key) |
cancel, done, get, get, isCancelled, isDone, run, runAndReset, set, setException
public Object task()
public String status()
status
in interface IERXStatus
public Double percentComplete()
percentComplete
in interface IERXPercentComplete
public void takeValueForKey(Object value, String key)
takeValueForKey
in interface NSKeyValueCoding
public Object valueForKey(String key)
valueForKey
in interface NSKeyValueCoding
public boolean hasStatus()
IERXStatus
interfacepublic boolean isStoppable()
IERXStoppable
interfacepublic boolean hasPercentComplete()
IERXPercentComplete
interfacepublic void afterExecute()
IERXExecutionStateTransition
afterExecute
in interface IERXExecutionStateTransition
public void beforeExecute()
IERXExecutionStateTransition
beforeExecute
in interface IERXExecutionStateTransition
Copyright © 2002 – 2024 Project Wonder.