Class ScanServlet
java.lang.Object
org.eclipse.scanning.server.servlet.AbstractJobQueueServlet<ScanBean>
org.eclipse.scanning.server.servlet.ScanServlet
- All Implemented Interfaces:
AutoCloseable,IConnection,IConnectable,IJobQueueServlet<ScanBean>
A servlet to do any scan type based on the information provided
in a ScanBean.
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.scanning.server.servlet.AbstractJobQueueServlet
broker, commandAckTopic, commandTopic, eventService, jobQueue, queueStatusTopic, statusTopic, submitQueue -
Constructor Summary
ConstructorsConstructorDescriptionScanServlet(boolean forTest) Utility constructor for test classes only- this forces the MVStore for JobQueueImpl (which uses scanServlet.getSubmitQueue()) to be unique per JVM, ensuring that multiple sets of running tests do not collide on trying to access their MVStores. -
Method Summary
Modifier and TypeMethodDescriptioncreateProcess(ScanBean scanBean, IPublisher<ScanBean> response) Creates a process for each request processed from the queue for this servlet.getName()Methods inherited from class org.eclipse.scanning.server.servlet.AbstractJobQueueServlet
connect, disconnect, getBroker, getCommandAckTopic, getCommandTopic, getJobQueue, getQueueStatusTopic, getStatusTopic, getSubmitQueue, isBlocking, isConnected, isPauseOnStart, isPurgeQueue, setBlocking, setBroker, setCommandTopic, setConsumer, setPauseOnStart, setPurgeQueue, setQueueStatusTopic, setStatusTopic, setSubmitQueueMethods 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.IConnection
close
-
Constructor Details
-
ScanServlet
public ScanServlet() -
ScanServlet
public ScanServlet(boolean forTest) Utility constructor for test classes only- this forces the MVStore for JobQueueImpl (which uses scanServlet.getSubmitQueue()) to be unique per JVM, ensuring that multiple sets of running tests do not collide on trying to access their MVStores. The creation of submission queues and of their submitters both use getSubmitQueue so parity is conserved. Special care should be taken by any test using this method to clean up any MVStore files that are produced. See ScanningTestUtil.clearStore()- Parameters:
forTest-
-
-
Method Details
-
getName
- Specified by:
getNamein classAbstractJobQueueServlet<ScanBean>
-
createProcess
public ScanProcess createProcess(ScanBean scanBean, IPublisher<ScanBean> response) throws EventException Description copied from interface:IJobQueueServletCreates a process for each request processed from the queue for this servlet.- Parameters:
scanBean-response-- Returns:
- Throws:
EventException
-