Class AbstractExecutionHandler<R>

    • Constructor Detail

      • AbstractExecutionHandler

        public AbstractExecutionHandler()
    • Method Detail

      • after

        public R after​(Path workingDir,
                       ExecutionReport report)
                throws IOException
        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. 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.

        Specified by:
        after in interface ExecutionHandler<R>
        Parameters:
        workingDir - the working directory used for this computation. Results may be read from it.
        report - the execution report, in particular reporting command execution errors.
        Returns:
        the actual result of the processing.
        Throws:
        IOException - if and error occurs while reading results from the working directory.