Package gda.commandqueue
Class CommandProcess
java.lang.Object
org.eclipse.scanning.api.event.core.AbstractLockingPausableProcess<CommandBean>
gda.commandqueue.CommandProcess
- All Implemented Interfaces:
IBeanProcess<CommandBean>,IPublishable<CommandBean>
Implementation of
IBeanProcess for running a Command. This
allows a command for the old command queue to be run on the new GDA9 queue.-
Field Summary
Fields inherited from class org.eclipse.scanning.api.event.core.AbstractLockingPausableProcess
bean, out, publisher -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCommandProcess(CommandBean bean, IPublisher<CommandBean> publisher) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoPause()Override this method to do work on a pause once the pause lock has been received.protected voiddoResume()Override this method to do work on a resume once the pause lock has been received.protected voidvoidexecute()Execute the process, if an exception is thrown the process is set to failed and the message is the message of the exception.Methods inherited from class org.eclipse.scanning.api.event.core.AbstractLockingPausableProcess
broadcast, checkPaused, dryRun, dryRun, dryRun, getBean, getPublisher, getUnique, isCancelled, isPaused, isWindowsOS, pause, resume, setCancelled, setLoggingFile, setLoggingFile, terminate, writeProjectBean, writeProjectBeanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.scanning.api.event.core.IBeanProcess
isBlocking, start
-
Constructor Details
-
CommandProcess
-
-
Method Details
-
doPause
Description copied from class:AbstractLockingPausableProcessOverride this method to do work on a pause once the pause lock has been received.- Overrides:
doPausein classAbstractLockingPausableProcess<CommandBean>- Throws:
Exception
-
doResume
Description copied from class:AbstractLockingPausableProcessOverride this method to do work on a resume once the pause lock has been received.- Overrides:
doResumein classAbstractLockingPausableProcess<CommandBean>- Throws:
Exception
-
doTerminate
- Overrides:
doTerminatein classAbstractLockingPausableProcess<CommandBean>- Throws:
Exception
-
execute
Description copied from interface:IBeanProcessExecute the process, if an exception is thrown the process is set to failed and the message is the message of the exception. This is the blocking method to run the process. The start method will be called by theIJobQueue's consumer thread running the process and by default terminate is called in the same thread.- Throws:
EventExceptionInterruptedException
-