Package gda.jython
Class GDAJythonScriptService
java.lang.Object
gda.jython.GDAJythonScriptService
- All Implemented Interfaces:
IScriptService
Implementation of
IScriptService for GDA. Runs scripts via the ICommandRunner
interface (i.e. JythonServerFacade). The language supported is
ScriptLanguage.SPEC_PASTICHE.-
Field Summary
Fields inherited from interface org.eclipse.scanning.api.script.IScriptService
VAR_NAME_CUSTOM_PARAMS, VAR_NAME_SCAN_BEAN, VAR_NAME_SCAN_MODEL, VAR_NAME_SCAN_PATH, VAR_NAME_SCAN_REQUEST, VAR_NAME_SCAN_REQUEST_JSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAborts any currently executing scripts.voidexecute(ScriptRequest req) Execute a script on the server.voidsetNamedValue(String name, Object value) Sets the variable with the given name to the given value, if the implementation supports this.For DAQ server version 8 and 9 this will probably be {JYTHON, SPEC_PASTICHE}
-
Constructor Details
-
GDAJythonScriptService
public GDAJythonScriptService()
-
-
Method Details
-
supported
Description copied from interface:IScriptServiceFor DAQ server version 8 and 9 this will probably be {JYTHON, SPEC_PASTICHE}- Specified by:
supportedin interfaceIScriptService- Returns:
- the available supported scripting languages that this service can execute.
-
execute
public void execute(ScriptRequest req) throws UnsupportedLanguageException, ScriptExecutionException Description copied from interface:IScriptServiceExecute a script on the server. This can be used for instance inside scanning to run a script before and after a scan.- Specified by:
executein interfaceIScriptService- Parameters:
req- the script request- Throws:
UnsupportedLanguageException- if the script language specified byScriptRequest.getLanguage()is not supported by this script service.ScriptExecutionException- if an error occurred running the script
-
setNamedValue
Description copied from interface:IScriptServiceSets the variable with the given name to the given value, if the implementation supports this.- Specified by:
setNamedValuein interfaceIScriptService- Parameters:
name- namevalue- value
-
abortScripts
public void abortScripts()Description copied from interface:IScriptServiceAborts any currently executing scripts.- Specified by:
abortScriptsin interfaceIScriptService
-