Package gda.util

Class CommandRunnerRunnable

All Implemented Interfaces:
Configurable, Findable, Runnable

public class CommandRunnerRunnable extends FindableConfigurableBase implements Runnable
Findable implementation of Runnable whose run method calls ICommandRunner.runCommand(java.lang.String) with the command property set by setCommand.

Any initial setup (importing modules etc) can be done by setting the initialSetup field. This setup will be run when this runner is configured and each time the namespace is reset.

Set the command to null or empty for the run method to do nothing

  • Constructor Details

    • CommandRunnerRunnable

      public CommandRunnerRunnable()
  • Method Details

    • configure

      public void configure()
      Description copied from class: ConfigurableBase
      Default implementation for classes that do not have to do any specific configuration.
      Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.
      Specified by:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase
    • getCommand

      public String getCommand()
      Returns:
      command that is sent to InterfaceProvider.getCommandRunner().runCommand()
    • setCommand

      public void setCommand(String command)
      Parameters:
      command - that is sent to InterfaceProvider.getCommandRunner().runCommand()
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • setInitialSetup

      public void setInitialSetup(String initialSetup)