Package org.csstudio.opibuilder.script
Class JythonScriptStore
java.lang.Object
org.csstudio.opibuilder.script.AbstractScriptStore
org.csstudio.opibuilder.script.JythonScriptStore
- All Implemented Interfaces:
IScriptStore
This is the implementation of
AbstractScriptStore
for Jython PythonInterpreter.-
Field Summary
Fields inherited from class org.csstudio.opibuilder.script.AbstractScriptStore
SCRIPT_LIBRARIES
-
Constructor Summary
ConstructorDescriptionJythonScriptStore
(ScriptData scriptData, AbstractBaseEditPart editpart, IPV[] pvArray) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
bootstrapInterpreter
(org.python.util.PythonInterpreter interpreter) protected void
Compile InputStream with script engine.protected void
compileString
(String string) protected void
dispose()
Dispose of all resources allocated by this script store.protected void
execScript
(IPV triggerPV) Execute the script with script engine.protected void
Methods inherited from class org.csstudio.opibuilder.script.AbstractScriptStore
getAbsoluteScriptPath, getDisplayEditPart, getEditPart, getPvArray, getScriptData, unRegister
-
Constructor Details
-
JythonScriptStore
public JythonScriptStore(ScriptData scriptData, AbstractBaseEditPart editpart, IPV[] pvArray) throws Exception - Throws:
Exception
-
-
Method Details
-
initScriptEngine
protected void initScriptEngine()- Specified by:
initScriptEngine
in classAbstractScriptStore
-
bootstrapInterpreter
public static void bootstrapInterpreter(org.python.util.PythonInterpreter interpreter) -
compileString
- Specified by:
compileString
in classAbstractScriptStore
- Throws:
Exception
-
compileInputStream
Description copied from class:AbstractScriptStore
Compile InputStream with script engine. The stream will be closed by this method.- Specified by:
compileInputStream
in classAbstractScriptStore
- Throws:
Exception
-
execScript
Description copied from class:AbstractScriptStore
Execute the script with script engine.- Specified by:
execScript
in classAbstractScriptStore
- Parameters:
triggerPV
- the PV that triggers this execution.- Throws:
Exception
-
dispose
protected void dispose()Description copied from class:AbstractScriptStore
Dispose of all resources allocated by this script store.- Overrides:
dispose
in classAbstractScriptStore
-