Class CompositeProcessListener

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class CompositeProcessListener
    extends ProcessListener
    implements java.lang.Cloneable
    Composite process event handler.
    • Constructor Detail

      • CompositeProcessListener

        public CompositeProcessListener()
      • CompositeProcessListener

        public CompositeProcessListener​(java.util.List<ProcessListener> children)
    • Method Detail

      • add

        public void add​(ProcessListener listener)
        Add new listener.
        Parameters:
        listener - listener to be added.
      • remove

        public void remove​(ProcessListener listener)
        Remove existing listener.
        Parameters:
        listener - listener to be removed.
      • removeAll

        public void removeAll​(java.lang.Class<? extends ProcessListener> type)
        Remove existing listeners of given type or its sub-types.
        Parameters:
        type - listener type.
      • clear

        public void clear()
        Remove all existing listeners.
      • beforeStart

        public void beforeStart​(ProcessExecutor executor)
        Description copied from class: ProcessListener
        Invoked before a process is started.
        Overrides:
        beforeStart in class ProcessListener
        Parameters:
        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.
      • afterStart

        public void afterStart​(java.lang.Process process,
                               ProcessExecutor executor)
        Description copied from class: ProcessListener
        Invoked after a process has started.
        Overrides:
        afterStart in class ProcessListener
        Parameters:
        process - the process started.
        executor - executor used for starting the process. Modifying the ProcessExecutor only affects the following processes not the one just started.
      • afterFinish

        public void afterFinish​(java.lang.Process process,
                                ProcessResult result)
        Description copied from class: ProcessListener
        Invoked after a process has finished successfully.
        Overrides:
        afterFinish in class ProcessListener
        Parameters:
        process - process just finished.
        result - result of the finished process.
      • afterStop

        public void afterStop​(java.lang.Process process)
        Description copied from class: ProcessListener
        Invoked after a process has exited (whether finished or cancelled).
        Overrides:
        afterStop in class ProcessListener
        Parameters:
        process - process just stopped.