|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zeroturnaround.exec.listener.ProcessListener
public abstract class ProcessListener
Event handler for process events.
This is a class instead of interface in order to add new methods without updating all implementations.
ProcessExecutor.addListener(ProcessListener)| Constructor Summary | |
|---|---|
ProcessListener()
|
|
| Method Summary | |
|---|---|
void |
afterFinish(Process process,
ProcessResult result)
Invoked after a process has finished successfully. |
void |
afterStart(Process process,
ProcessExecutor executor)
Invoked after a process has started. |
void |
afterStop(Process process)
Invoked after a process has exited (whether finished or cancelled). |
void |
beforeStart(ProcessExecutor executor)
Invoked before a process is started. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProcessListener()
| Method Detail |
|---|
public void beforeStart(ProcessExecutor executor)
executor - executor used for starting a process.
Any changes made here apply to the starting process.
Once the process has started it is not affected by the ProcessExecutor any more.
public void afterStart(Process process,
ProcessExecutor executor)
process - the process started.executor - executor used for starting the process.
Modifying the ProcessExecutor only affects the following processes
not the one just started.
public void afterFinish(Process process,
ProcessResult result)
process - process just finished.result - result of the finished process.public void afterStop(Process process)
process - process just stopped.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||