public interface ProcessExecutionHandler
| Modifier and Type | Method and Description |
|---|---|
boolean |
isProcessAlive()
Returns
true if the process is alive; |
void |
killProcess()
Kill the process.
|
void |
onEnd()
Always called at the end, whether the process
exited or an exception occured.
|
void |
onExit(int exitVal)
Called when the process exits.
|
void |
onLaunchException(Exception ex)
Called if an exception occured during the launch
of the program.
|
void |
onSystemErr(String line)
Called when a line is written to the standard
errors by the created process.
|
void |
onSystemOut(String line)
Called when a line is written to the standard
output by the created process.
|
void |
onTimeoutException()
Called if the execution of the program
exceeds the specified timeout.
|
void |
setProcessAndProcessKiller(Process process,
ProcessKiller processKiller)
Internal use.
|
void setProcessAndProcessKiller(Process process, ProcessKiller processKiller)
Will be called automatically when the process is created.
boolean isProcessAlive()
true if the process is alive;void onLaunchException(Exception ex)
void onTimeoutException()
void onExit(int exitVal)
0
value means that no error occured.
Note that this method will not
be called if there is an exception while
launching the program! In that case,
onLaunchException(Exception)
will be called instead.
void onEnd()
void onSystemOut(String line)
void onSystemErr(String line)
void killProcess()
Copyright © 2019. All rights reserved.