Package gda.util

Class SingleCommandRunner

java.lang.Object
gda.factory.FindableBase
gda.util.SingleCommandRunner
All Implemented Interfaces:
Stoppable, Findable, RemoteCommandRunner, org.springframework.beans.factory.InitializingBean

@ServiceInterface(RemoteCommandRunner.class) public class SingleCommandRunner extends FindableBase implements RemoteCommandRunner, org.springframework.beans.factory.InitializingBean
RemoteCommandRunner that prevents command being run multiple times concurrently
Multiple commands can also be configured such that only one of them may be running at any one time.
  • Constructor Details

    • SingleCommandRunner

      public SingleCommandRunner()
  • Method Details

    • runCommand

      public void runCommand(Serializable... arguments)
      Specified by:
      runCommand in interface RemoteCommandRunner
    • setSharedState

      public void setSharedState(AtomicBoolean state)
    • setCommand

      public void setCommand(String command)
    • setRunner

      public void setRunner(Jython runner)
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • stop

      public void stop()
      Description copied from interface: Stoppable
      Stops the current operation.
      Specified by:
      stop in interface Stoppable