R
- public abstract class AbstractExecutionHandler<R> extends java.lang.Object implements ExecutionHandler<R>
ExecutionHandler
s implementations.Constructor and Description |
---|
AbstractExecutionHandler() |
Modifier and Type | Method and Description |
---|---|
R |
after(java.nio.file.Path workingDir,
ExecutionReport report)
Method called by the
ComputationManager with the working directory and an execution report as parameters,
after the commands defined by the ExecutionHandler.before(java.nio.file.Path) method have been executed:
it is in charge of any postprocessing and of providing the actual computation result. |
void |
onExecutionCompletion(CommandExecution execution,
int executionIndex)
Empty implementation.
|
void |
onExecutionStart(CommandExecution execution,
int executionIndex)
Empty implementation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
before
public void onExecutionStart(CommandExecution execution, int executionIndex)
onExecutionStart
in interface ExecutionHandler<R>
public void onExecutionCompletion(CommandExecution execution, int executionIndex)
onExecutionCompletion
in interface ExecutionHandler<R>
public R after(java.nio.file.Path workingDir, ExecutionReport report) throws java.io.IOException
ComputationManager
with the working directory and an execution report as parameters,
after the commands defined by the ExecutionHandler.before(java.nio.file.Path)
method have been executed:
it is in charge of any postprocessing and of providing the actual computation result.
Typically, it will check that the execution was correctly performed, then read command results
from the specified working directory and translate it to a business object.
That method will not be called in case the call to ExecutionHandler.before(java.nio.file.Path)
throws an exception,
or if the execution is cancelled.
That implementation checks the ExecutionReport
for errors, and throws a PowsyblException
in that case. May be called by actual implementations.
after
in interface ExecutionHandler<R>
workingDir
- the working directory used for this computation. Results may be read from it.report
- the execution report, in particular reporting command execution errors.java.io.IOException
- if and error occurs while reading results from the working directory.