Package org.eclipse.ease
Class ScriptResult
java.lang.Object
org.eclipse.ease.ScriptResult
A ScriptResult is a container for a script execution. As execution often occurs detached from the System thread, the result object contains an indicator for
pending and finished results. Results itself may contain an object or an exception.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
VOID
Special void object for script methods not returning a result.
-
-
Constructor Details
-
ScriptResult
public ScriptResult()
-
-
Method Details
-
setResult
Set the result to be stored.- Parameters:
result
- object to be stored
-
setException
Set an exception to be stored for this result.- Parameters:
e
- exception to be stored
-
toString
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceFuture<Object>
-
isDone
public boolean isDone() -
get
- Specified by:
get
in interfaceFuture<Object>
- Throws:
ScriptExecutionException
-
get
public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
get
in interfaceFuture<Object>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
get
public Object get(long milliSeconds) throws InterruptedException, ExecutionException, TimeoutException
-