Class AbstractProcessExecutor

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int execute​(java.lang.String[] command, java.lang.String[] environment, java.io.File directory, Drain stdOutput, Drain stdError)
      Shortcut method calling this.execute(new ProcessContext(command, environment, directory, stdOutput, stdError));.
      • Methods inherited from class java.lang.Object

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

      • AbstractProcessExecutor

        public AbstractProcessExecutor()
    • Method Detail

      • execute

        public int execute​(java.lang.String[] command,
                           java.lang.String[] environment,
                           java.io.File directory,
                           Drain stdOutput,
                           Drain stdError)
                    throws java.io.IOException
        Shortcut method calling this.execute(new ProcessContext(command, environment, directory, stdOutput, stdError));.

        Synchronously executes the given command in the given environment and directory.

        Specified by:
        execute in interface ProcessExecutor
        Parameters:
        command - the command line to execute/
        environment - the environment to use
        directory - the directory to execute the command in
        stdOutput - callback handle to process the processes standard output
        stdError - callback handle to process the processes standard error output
        Returns:
        the exit code of the process
        Throws:
        java.io.IOException - on any error executing the process.
        See Also:
        ProcessExecutor.execute(String[], String[], File, Drain, Drain)