public class CompositeProcessListener extends ProcessListener implements Cloneable
| Constructor and Description |
|---|
CompositeProcessListener() |
CompositeProcessListener(List<ProcessListener> children) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ProcessListener listener)
Add new listener.
|
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.
|
void |
clear()
Remove all existing listeners.
|
CompositeProcessListener |
clone() |
void |
remove(ProcessListener listener)
Remove existing listener.
|
void |
removeAll(Class<? extends ProcessListener> type)
Remove existing listeners of given type or its sub-types.
|
public CompositeProcessListener()
public CompositeProcessListener(List<ProcessListener> children)
public void add(ProcessListener listener)
listener - listener to be added.public void remove(ProcessListener listener)
listener - listener to be removed.public void removeAll(Class<? extends ProcessListener> type)
type - listener type.public void clear()
public CompositeProcessListener clone()
public void beforeStart(ProcessExecutor executor)
ProcessListenerbeforeStart in class ProcessListenerexecutor - 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)
ProcessListenerafterStart in class ProcessListenerprocess - 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)
ProcessListenerafterFinish in class ProcessListenerprocess - process just finished.result - result of the finished process.public void afterStop(Process process)
ProcessListenerafterStop in class ProcessListenerprocess - process just stopped.Copyright © 2020 ZeroTurnaround. All rights reserved.