Class ProcessListener


  • @API(type=EXTENDABLE,
         src=PUBLIC)
    public abstract class ProcessListener
    extends java.lang.Object
    The process listener. Listens on an executed process.
    Since:
    12.1
    • Constructor Summary

      Constructors 
      Constructor Description
      ProcessListener()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void newErrorLine​(java.lang.String line)
      Called when the process outputs a line in the System.err
      void newOutputLine​(java.lang.String line)
      Called when the process outputs a line in the System.out
      void processAboutToStart​(java.lang.String processName, java.lang.String fullCommand)
      Called when the process is about to start.
      void processCouldNotStart​(java.lang.String message)
      Called when the system could not exec the process.
      void processEnded​(int exitCode)
      Called when the process ends.
      void processStarted​(java.lang.Process process)
      Called when the process is started.
      void processStarted​(java.lang.String processName, java.lang.String fullCommand)
      Deprecated.
      replaced with processAboutToStart in version 23.1.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProcessListener

        public ProcessListener()
    • Method Detail

      • newOutputLine

        public void newOutputLine​(java.lang.String line)
        Called when the process outputs a line in the System.out
        Parameters:
        line - The output line.
      • newErrorLine

        public void newErrorLine​(java.lang.String line)
        Called when the process outputs a line in the System.err
        Parameters:
        line - The error line.
      • processEnded

        public void processEnded​(int exitCode)
        Called when the process ends.
        Parameters:
        exitCode - The exit code of the process.
      • processStarted

        @Deprecated
        public void processStarted​(java.lang.String processName,
                                   java.lang.String fullCommand)
        Deprecated.
        replaced with processAboutToStart in version 23.1.
        Called when the process is about to start.
        Parameters:
        fullCommand - The full command line.
        processName - The name of process.
      • processAboutToStart

        public void processAboutToStart​(java.lang.String processName,
                                        java.lang.String fullCommand)
        Called when the process is about to start.
        Parameters:
        fullCommand - The full command line.
        processName - The name of process.
        Since:
        23.1
      • processStarted

        public void processStarted​(java.lang.Process process)
        Called when the process is started.
        Parameters:
        process - The process which started
        Since:
        23.1
      • processCouldNotStart

        public void processCouldNotStart​(java.lang.String message)
        Called when the system could not exec the process.
        Parameters:
        message - The error message.