Package com.aspectran.core.util
Class ProcessRunner
- java.lang.Object
-
- com.aspectran.core.util.ProcessRunner
-
public class ProcessRunner extends java.lang.ObjectThe ProcessRunner class helps running external processes.Created: 2019-04-12
-
-
Constructor Summary
Constructors Constructor Description ProcessRunner()ProcessRunner(ProcessLogger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisRunning()booleanisTerminated()intrun(java.lang.String[] command)intrun(java.lang.String[] command, java.io.PrintWriter errOut)voidrunInBackground(java.lang.String[] command)voidsetWorkingDir(java.lang.String workingDir)voidterminate()
-
-
-
Constructor Detail
-
ProcessRunner
public ProcessRunner()
-
ProcessRunner
public ProcessRunner(ProcessLogger logger)
-
-
Method Detail
-
setWorkingDir
public void setWorkingDir(java.lang.String workingDir)
-
run
public int run(java.lang.String[] command) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
run
public int run(java.lang.String[] command, java.io.PrintWriter errOut) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
runInBackground
public void runInBackground(java.lang.String[] command)
-
isRunning
public boolean isRunning()
-
isTerminated
public boolean isTerminated()
-
terminate
public void terminate()
-
-