Class QueueCommandBean<B extends StatusBean>
java.lang.Object
org.eclipse.scanning.api.event.IdBean
org.eclipse.scanning.api.event.queue.QueueCommandBean<B>
- Type Parameters:
B- the type of status bean
- All Implemented Interfaces:
Serializable
A
QueueCommandBean can be used to control an IJobQueue. It can be sent
to the IJobQueues command topic (as returned by IJobQueue.getCommandTopicName()).
A proxy to the IJobQueue created by calling IEventService.createJobQueueProxy(java.net.URI, String)
controls the real job queue on the server by sending QueueCommandBeans.
The action to be taken by the job queue is determined by the command, as set by calling
setCommand(Command). The command available can by split into three
categories:
- Some command, such as
QueueCommandBean.Command.PAUSE_QUEUEandQueueCommandBean.Command.RESUME_QUEUE, affect the job queue's consumer thread; - others, such as
QueueCommandBean.Command.MOVE_FORWARD,QueueCommandBean.Command.MOVE_BACKWARD,QueueCommandBean.Command.REMOVE_FROM_QUEUEandQueueCommandBean.Command.CLEAR_QUEUE, affect the submission queue, most of these methods require the bean to be set; - the remaining commands such as
QueueCommandBean.Command.REMOVE_COMPLETEDand affect the set of running and completed jobs (the status set)
The IJobQueue can be identified either by calling setJobQueueId(UUID) with the
UUID of the job queue, or by calling setQueueName(String) with the name of the job
queue's submission queue.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn enumeration of the commands that anIJobQueuecan perform. -
Constructor Summary
ConstructorsConstructorDescriptionQueueCommandBean(String queueName, QueueCommandBean.Command command) QueueCommandBean(String queueName, QueueCommandBean.Command command, B jobBean) QueueCommandBean(String queueName, QueueCommandBean.Command command, String commandParam) QueueCommandBean(UUID consumerId, QueueCommandBean.Command command) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()voidsetCommand(QueueCommandBean.Command command) voidsetErrorMessage(String errorMessage) voidsetJobBean(B jobBean) voidsetJobQueueId(UUID consumerId) voidsetMessage(String message) voidsetQueueName(String queueName) voidtoString()Methods inherited from class org.eclipse.scanning.api.event.IdBean
getUniqueId, merge, setUniqueId
-
Constructor Details
-
QueueCommandBean
public QueueCommandBean() -
QueueCommandBean
-
QueueCommandBean
-
QueueCommandBean
-
QueueCommandBean
-
-
Method Details
-
getJobQueueId
-
setJobQueueId
-
getMessage
-
setMessage
-
getQueueName
-
setQueueName
-
getCommand
-
setCommand
-
getJobBean
-
setJobBean
-
getErrorMessage
-
setErrorMessage
-
getResult
-
setResult
-
hashCode
public int hashCode() -
equals
-
toString
-