Class CommandExecutor

java.lang.Object
org.csstudio.opibuilder.widgetActions.CommandExecutor

public final class CommandExecutor extends Object
Helper for executing a (system) command. On Unix, that could be anything in the PATH.

Several things can happen:

  • Command finishes OK right away
  • Command gives error right away
  • Command runs for a long time, eventually giving error or OK.
The command executor waits a little time to see if the command finishes, and calls back in case of an error. When the command finishes right away OK or runs longer, we leave it be.
  • Constructor Details

    • CommandExecutor

      public CommandExecutor(String command, String dir_name, int wait)
      Initialize
      Parameters:
      command - Command to run. Format depends on OS.
      dir_name - Directory where to run the command
      wait - Time to wait for completion in seconds