public interface ExecutionHandle
Task
by a
Session
. A new handle is created for each
execution.Session.spawnTask(com.spss.psapi.task.Task)
,
Session.spawn(com.spss.psapi.transform.ProcessorStream, java.util.Collection)
,
Session.spawn(com.spss.psapi.transform.Processor[], java.util.Collection)
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorMessage()
Returns an error message if execution terminated with an error and a
message is available; returns
null otherwise. |
ExecutionState |
getExecutionState()
Returns the latest
ExecutionState of the associated task. |
int |
getExitCode()
Returns the exit code from executing the task.
|
java.lang.Object |
getResult()
Returns the result of the task if execution terminated with success and
the task produced a result.
|
Task |
getTask()
Returns the
Task being executed. |
ExecutionState |
terminate()
Terminates execution of the associated task and returns its final
ExecutionState . |
ExecutionState |
terminate(long milliseconds)
Terminates execution of the associated task, waits until the task has
finished or until the specified timeout has expired (whichever is sooner)
and returns the execution state of the task.
|
ExecutionState |
waitForCompletion()
Waits until the associated task has finished executing and returns its
final
ExecutionState . |
ExecutionState |
waitForCompletion(long milliseconds)
Waits until the associated task has finished executing, or until the
specified timeout has expired (whichever is sooner) and returns the
ExecutionState of the task. |
Task getTask()
Task
being executed.Task
being executedExecutionState getExecutionState()
ExecutionState
of the associated task.ExecutionState waitForCompletion()
ExecutionState
.ExecutionState waitForCompletion(long milliseconds)
ExecutionState
of the task. A timeout of 0 or less means to
wait forever.milliseconds
- the maximum time to wait for completionExecutionState terminate()
ExecutionState
. The call blocks until the task has finished.
The return value may not be TERMINATED
if execution had
completed before the termination request was sent.ExecutionState terminate(long milliseconds)
TERMINATED
if execution had completed before the termination
request was sent or if execution had not completed before the timeout
expired. A timeout of 0 or less means to wait forever.milliseconds
- the maximum time to wait for the task to completejava.lang.Object getResult()
null
if the task is
still executing, or if it terminated in a state other than
SUCCESS
, or if it did not return a result.null
otherwiseint getExitCode()
java.lang.String getErrorMessage()
null
otherwise.Copyright © 2014 Integral Solutions Ltd. All Rights Reserved.