Interface CommandExec

  • All Known Implementing Classes:
    DefaultCommandExec, ScriptCommandExec

    public interface CommandExec
    Executes an external command.
    Since:
    1.11
    Author:
    Erwin Mueller, erwin.mueller@deventm.org
    • Method Detail

      • setThreads

        void setThreads​(Threads threads)
        Sets the threads pool.
        Parameters:
        threads - the Threads.
      • setCommandOutput

        void setCommandOutput​(CommandOutput output)
        Sets that reads the standard output of the command.
        Parameters:
        output - the CommandOutput.
      • setCommandError

        void setCommandError​(CommandOutput error)
        Sets that reads the error output of the command.
        Parameters:
        error - the CommandOutput.
      • setCommandInput

        void setCommandInput​(CommandInput input)
        Sets that writes to the standard input of the command.
        Parameters:
        input - the CommandInput.
      • setExitCode

        void setExitCode​(int... code)
        Sets the valid command code(s).
        Parameters:
        code - the valid command code(s).
      • setDestroyOnTimeout

        void setDestroyOnTimeout​(boolean flag)
        Sets to destroy the executed command on timeout.
        Parameters:
        flag - sets to true to destroy the executed command on timeout.
      • setObserver

        void setObserver​(Observer... observer)
        Sets the additional observer(s) for the command task.
        Parameters:
        observer - the Observer observer(s).