Class NativeGitProvider.JavaProcessRunner

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected JavaProcessRunner()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String run​(java.io.File directory, long nativeGitTimeoutInMs, java.lang.String command)
      Run a command and return the entire output as a String - naive, we know.
      boolean runEmpty​(java.io.File directory, long nativeGitTimeoutInMs, java.lang.String command)
      Run a command and return false if it contains at least one output line
      • Methods inherited from class java.lang.Object

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

      • JavaProcessRunner

        protected JavaProcessRunner()
    • Method Detail

      • run

        public java.lang.String run​(java.io.File directory,
                                    long nativeGitTimeoutInMs,
                                    java.lang.String command)
                             throws java.io.IOException,
                                    GitCommitIdExecutionException
        Description copied from interface: NativeGitProvider.ProcessRunner
        Run a command and return the entire output as a String - naive, we know.
        Specified by:
        run in interface NativeGitProvider.ProcessRunner
        Parameters:
        directory - the directory where the command should be executed in
        nativeGitTimeoutInMs - the timeout in milliseconds before the command get's terminated
        command - the command to execute
        Returns:
        the output obtained from stdout by running the command
        Throws:
        java.io.IOException - if any underlying IOError occurred
        GitCommitIdExecutionException - the command execution failed
      • runEmpty

        public boolean runEmpty​(java.io.File directory,
                                long nativeGitTimeoutInMs,
                                java.lang.String command)
                         throws java.io.IOException,
                                GitCommitIdExecutionException
        Description copied from interface: NativeGitProvider.ProcessRunner
        Run a command and return false if it contains at least one output line
        Specified by:
        runEmpty in interface NativeGitProvider.ProcessRunner
        Parameters:
        directory - the directory where the command should be executed in
        nativeGitTimeoutInMs - the timeout in milliseconds before the command get's terminated
        command - the command to execute
        Returns:
        false if the output of the command contains at least one line on stdout, true otherwise
        Throws:
        java.io.IOException - if any underlying IOError occurred
        GitCommitIdExecutionException - the command execution failed