public abstract class AProcessListener extends java.lang.Object implements IProcessListener
| Constructor and Description |
|---|
AProcessListener() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
handleError(java.lang.String error)
Handle the output of the error output stream.
|
abstract void |
handleInput(java.lang.String input)
Handle the output of the standard output stream.
|
void |
listenTo(java.lang.Process process)
Lets the process listener listen to the output and error stream of the given process.
|
public void listenTo(java.lang.Process process)
throws java.io.IOException,
java.lang.InterruptedException
IProcessListenerlistenTo in interface IProcessListenerprocess - The process to be listened to.java.io.IOExceptionjava.lang.InterruptedExceptionpublic abstract void handleError(java.lang.String error)
throws java.io.IOException,
java.lang.InterruptedException
error - The line sent by the process via the error stream.java.io.IOException - An IOException is thrown if there is an issue reading from the process's stream.java.lang.InterruptedException - An interrupted exception is thrown if the thread/process is interrupted while processing the error messages.public abstract void handleInput(java.lang.String input)
throws java.io.IOException,
java.lang.InterruptedException
error - The line sent by the process via the standard output stream.java.io.IOException - An IOException is thrown if there is an issue reading from the process's stream.java.lang.InterruptedException - An interrupted exception is thrown if the thread/process is interrupted while processing the standard output messages.