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.
Multiple commands can also be configured such that only one of them may be running at any one time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidrunCommand(Serializable... arguments) voidsetCommand(String command) voidvoidsetSharedState(AtomicBoolean state) voidstop()Stops the current operation.Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Constructor Details
-
SingleCommandRunner
public SingleCommandRunner()
-
-
Method Details
-
runCommand
- Specified by:
runCommandin interfaceRemoteCommandRunner
-
setCommand
-
setRunner
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
stop
public void stop()Description copied from interface:StoppableStops the current operation.
-