|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--juju.reattore.util.Spawner
A native process wrapper that provides higher level functionality over Runtime.exec()
Constructor Summary | |
Spawner()
|
Method Summary | |
void |
destroy()
Kills the process if it is not yet finished. |
int |
exitValue()
The exit code of the process, if present. |
java.util.List |
getOutput()
The processes stdout and stderr, combined, as a list of strings. |
boolean |
isDone()
Set if the process is finished. |
void |
run()
Internal method. |
void |
setCommand(java.lang.String command)
The Runtime.exec command to run. |
void |
setDir(java.lang.String dir)
The working directory to start in. |
void |
spawn()
Starts the process running in the background and waits for it to start. |
void |
waitDone()
Waits for the process to terminate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Spawner()
Method Detail |
public void run()
run
in interface java.lang.Runnable
public void setCommand(java.lang.String command)
command
- The command.public void setDir(java.lang.String dir)
dir
- Working directory.public void spawn() throws java.lang.Exception
java.lang.Exception
- on error.public void waitDone() throws java.lang.Exception
java.lang.Exception
- on error.public int exitValue()
public boolean isDone()
public void destroy() throws java.lang.Exception
java.lang.Exception
- on error.public java.util.List getOutput()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |