public class ProcessSolverRunner extends java.lang.Object implements ISolverRunner
ISolverRunner
implementation used for language
that are ran through a Process
.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
command
Command binary name that will be ran by this runner.
|
private static java.lang.String |
EXECUTION_ERROR
Error message displayed when an error occurs while executing subprocess.
|
private java.lang.Process |
process
Process reference that is ran by this runner.
|
private ProblemSolver |
solver
Problem solver instance this runner should execute.
|
Constructor and Description |
---|
ProcessSolverRunner(java.lang.String command,
ProblemSolver solver)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isTerminated()
Indicates if this solver running step is terminated or not.
|
void |
run(java.lang.String arguments,
java.lang.String output)
Starts the solver running step, using the given
arguments as execution input
(provided through command line arguments).
|
private static final java.lang.String EXECUTION_ERROR
private final ProblemSolver solver
private final java.lang.String command
private java.lang.Process process
public ProcessSolverRunner(java.lang.String command, ProblemSolver solver)
command
- Command binary name that will be ran by this runner.solver
- Problem solver instance this runner should execute.public boolean isTerminated()
isTerminated
in interface ISolverRunner
public void run(java.lang.String arguments, java.lang.String output) throws org.eclipse.core.runtime.CoreException
run
in interface ISolverRunner
arguments
- Command line arguments to provide to the runner.output
- Path of the output file on which solver output should be redirected.org.eclipse.core.runtime.CoreException
- If any error occurs during execution.