Class RunProcess


  • public class RunProcess
    extends java.lang.Object
    Utility used to run a process.
    Since:
    1.1.0
    Author:
    Phillip Webb, Dave Syer, Andy Wilkinson, Stephane Nicoll
    • Constructor Summary

      Constructors 
      Constructor Description
      RunProcess​(java.lang.String... command)  
    • Method Summary

      Modifier and Type Method Description
      java.lang.Process getRunningProcess()
      Return the running process.
      boolean handleSigInt()
      Return if the process was stopped.
      boolean hasJustEnded()  
      void kill()
      Kill this process.
      int run​(boolean waitForProcess, java.lang.String... args)  
      protected int run​(boolean waitForProcess, java.util.Collection<java.lang.String> args)  
      • Methods inherited from class java.lang.Object

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

      • RunProcess

        public RunProcess​(java.lang.String... command)
    • Method Detail

      • run

        public int run​(boolean waitForProcess,
                       java.lang.String... args)
                throws java.io.IOException
        Throws:
        java.io.IOException
      • run

        protected int run​(boolean waitForProcess,
                          java.util.Collection<java.lang.String> args)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getRunningProcess

        public java.lang.Process getRunningProcess()
        Return the running process.
        Returns:
        the process or null
      • handleSigInt

        public boolean handleSigInt()
        Return if the process was stopped.
        Returns:
        true if stopped
      • kill

        public void kill()
        Kill this process.
      • hasJustEnded

        public boolean hasJustEnded()