V
- the result type returned by this ERXFutureTask's get methodpublic class ERXFutureTask<V> extends FutureTask<V> implements IERXExecutionStateTransition, IERXStatus, IERXPercentComplete, com.webobjects.foundation.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);
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.DefaultImplementation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.MapImplementation, com.webobjects.foundation.NSKeyValueCoding.Null<T>, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.Utility, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
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 com.webobjects.foundation.NSKeyValueCoding
public Object valueForKey(String key)
valueForKey
in interface com.webobjects.foundation.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 – 2020 Project Wonder.