Interface ExternalCommand

    • Method Detail

      • setOutputType

        void setOutputType​(OutputType value)
        Sets what output to forward.
        Parameters:
        value - the type of output
      • getOutputType

        OutputType getOutputType()
        Returns what output to forward.
        Returns:
        the type of output
      • outputTypeTipText

        String outputTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setStdErrProcessor

        void setStdErrProcessor​(StdErrProcessor value)
        Sets the handler for processing the output received on stderr.
        Parameters:
        value - the handler
      • getStdErrProcessor

        StdErrProcessor getStdErrProcessor()
        Returns the handler for processing the output received on stderr.
        Returns:
        the handler
      • stdErrProcessorTipText

        String stdErrProcessorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setStdOutProcessor

        void setStdOutProcessor​(StdOutProcessor value)
        Sets the handler for processing the output received on stdout.
        Parameters:
        value - the handler
      • getStdOutProcessor

        StdOutProcessor getStdOutProcessor()
        Returns the handler for processing the output received on stdout.
        Returns:
        the handler
      • stdOutProcessorTipText

        String stdOutProcessorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setOutputFormatter

        void setOutputFormatter​(OutputFormatter value)
        Sets the formatter to use for the output that is being forwarded.
        Parameters:
        value - the formatter
      • getOutputFormatter

        OutputFormatter getOutputFormatter()
        Returns the formatter to use for the output that is being forwarded.
        Returns:
        the formatter
      • outputFormatterTipText

        String outputFormatterTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • isUsingBlocking

        boolean isUsingBlocking()
        Whether the command is used in a blocking or async fashion.
        Returns:
        true if blocking, false if async
      • execute

        String execute()
        Executes the command.
        Returns:
        null if successful, otherwise error message
      • hasLastCommand

        boolean hasLastCommand()
        Checks whether a command has been executed (and recorded).
        Returns:
        true if executed/recorded
      • getLastCommand

        String[] getLastCommand()
        Returns the last command that was executed.
        Returns:
        the last command, null if not available
      • isExecuted

        boolean isExecuted()
        Returns whether the command was executed.
        Returns:
        true if executed
      • isRunning

        boolean isRunning()
        Returns whether the command is currently running.
        Returns:
        true if running
      • isFinished

        boolean isFinished()
        Returns whether the command finished.
        Returns:
        true if finished
      • hasOutput

        boolean hasOutput()
        Whether there is any pending output.
        Returns:
        true if output pending
      • output

        Object output()
        Returns the next line in the output.
        Returns:
        the line, null if none available
      • addFormattedOutput

        void addFormattedOutput​(Object output)
        Gets called by the output formatter class.
        Parameters:
        output - the formatted output to collect
      • generates

        Class generates()
        Returns what output type the command generates via its output formatter.
        Returns:
        the type
      • cleanUp

        void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface CleanUpHandler