public class ScriptResult
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
VOID
Special void object for script methods not returning a result.
|
| Constructor and Description |
|---|
ScriptResult()
Constructor of a pending execution.
|
ScriptResult(java.lang.Object result)
Constructor for a finished execution.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Throwable |
getException()
Get the exception stored within this result.
|
java.lang.Object |
getResult()
Get the result value stored.
|
boolean |
hasException()
Checks whether this result contains an exception.
|
boolean |
isReady()
Verify that this ScriptResult is processed.
|
java.lang.String |
toString() |
void |
waitForResult()
Blocks execution until the execution result is ready.
|
void |
waitForResult(long timeout)
Blocks execution until the execution result is ready or the timeout is reached.
|
public static final java.lang.Object VOID
public ScriptResult()
public ScriptResult(java.lang.Object result)
result - result of executionpublic final boolean isReady()
public final void waitForResult()
public final void waitForResult(long timeout)
isReady() as
the timeout might have depleted.timeout - the maximum time to wait in milliseconds.public final java.lang.Object getResult()
public final java.lang.Throwable getException()
public final java.lang.String toString()
toString in class java.lang.Objectpublic final boolean hasException()