|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.scape_project.pit.proc.ProcessRunner
public class ProcessRunner
ProcessRunner class.
Native command executor. Based on ProcessBuilder.
This code is not yet entirely thread safe. Be sure to only call a given processRunner from one thread, and do not reuse it.
This class is based on the PLANETS class eu.planets_project.services.utils.ProcessRunner
| Field Summary | |
|---|---|
static int |
MAX_BYTES_OUT
Maximum number of bytes to be collected from std out |
static int |
MAX_WAIT_MILLIS
The Maximum wait time |
static int |
WAIT
Time to wait |
| Constructor Summary | |
|---|---|
ProcessRunner()
Constructor which initialises the process builder |
|
ProcessRunner(List<String> commands)
Constructor which takes the command list |
|
| Method Summary | |
|---|---|
int |
getCode()
Get process return code |
InputStream |
getErrInputStream()
Get error stream of the process |
InputStream |
getStdInputStream()
Get input stream of the process |
void |
run()
Run the process |
void |
setCommandList(List<String> commands)
Set the command list that will be passed to the process builder |
void |
setProcessDir(String processDirName)
Initial dir of the process. |
void |
setProcessInputStream(InputStream processInputStream)
Set process input stream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_BYTES_OUT
public static final int WAIT
public static final int MAX_WAIT_MILLIS
| Constructor Detail |
|---|
public ProcessRunner()
public ProcessRunner(List<String> commands)
commands - | Method Detail |
|---|
public void setCommandList(List<String> commands)
commands - Command listpublic void setProcessInputStream(InputStream processInputStream)
processInputStream - Process input streampublic InputStream getStdInputStream()
public InputStream getErrInputStream()
public int getCode()
public void run()
run in interface Runnablepublic void setProcessDir(String processDirName)
processDirName - Name of initial dir
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||