Package uk.ac.gda.ui.tool.rest
Class ExperimentControllerServiceClient
java.lang.Object
uk.ac.gda.ui.tool.rest.ExperimentControllerServiceClient
Provides to the GDA client access a
ExperimentController service
client.experiment.service.endpoint is the property which configures the URL endpoint to the service. The
default value is http://127.0.0.1:8888/experiment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the experiment name, ornullif no experiment is runningbooleanReturns the state of the experimentprepareAcquisition(String acquisitionName) Creates a new location within the experiment structure.startExperiment(String experimentName) Starts a new named experimentstartMultipartAcquisition(String acquisitionName) Prepares the controller for an acquisition composed of multiple parts.voidCloses the active experiment.voidCloses the current multipart acquisition is complete.
-
Constructor Details
-
ExperimentControllerServiceClient
public ExperimentControllerServiceClient()
-
-
Method Details
-
startExperiment
Starts a new named experiment- Parameters:
experimentName- A user-friendly identifier for the experiment- Returns:
- the experiment file URL; created at the end of the experiment (
stopExperiment()// * @throws ExperimentControllerException // * if methods fails to create the experiment location - Throws:
GDAClientRestException
-
getExperimentName
Returns the experiment name, ornullif no experiment is running -
stopExperiment
Closes the active experiment. Closes also any open multipart acquisition. // * @throws ExperimentControllerException // * if methods fails orisExperimentInProgress()returnsfalse- Throws:
GDAClientRestException
-
isExperimentInProgress
public boolean isExperimentInProgress()Returns the state of the experiment- Returns:
trueif the experiment is in progress, otherwisefalse
-
prepareAcquisition
Creates a new location within the experiment structure.- Parameters:
acquisitionName- A user-friendly identifier for the acquisition- Returns:
- The URL for the acquisition file // * @throws ExperimentControllerException // * if methods fails to create the acquisition location
- Throws:
GDAClientRestException
-
startMultipartAcquisition
Prepares the controller for an acquisition composed of multiple parts. Each part should then be given a URL by callingprepareAcquisition(String), and the overall acquisition should be ended withstopMultipartAcquisition()- Parameters:
acquisitionName- A user-friendly identifier for the acquisition- Returns:
- the URL of the acquisition file, created when the multipart acquisition is stopped // * @throws ExperimentControllerException
- Throws:
GDAClientRestException
-
stopMultipartAcquisition
Closes the current multipart acquisition is complete. // * @throws ExperimentControllerException // * if no open multipart acquisition exists- Throws:
GDAClientRestException
-