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
ConstructorsConstructorDescriptionJythonScriptStore(ScriptData scriptData, AbstractBaseEditPart editpart, IPV[] pvArray) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbootstrapInterpreter(org.python.util.PythonInterpreter interpreter) protected voidCompile InputStream with script engine.protected voidcompileString(String string) protected voiddispose()Dispose of all resources allocated by this script store.protected voidexecScript(IPV triggerPV) Execute the script with script engine.protected voidMethods 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:
initScriptEnginein classAbstractScriptStore
-
bootstrapInterpreter
public static void bootstrapInterpreter(org.python.util.PythonInterpreter interpreter) -
compileString
- Specified by:
compileStringin classAbstractScriptStore- Throws:
Exception
-
compileInputStream
Description copied from class:AbstractScriptStoreCompile InputStream with script engine. The stream will be closed by this method.- Specified by:
compileInputStreamin classAbstractScriptStore- Throws:
Exception
-
execScript
Description copied from class:AbstractScriptStoreExecute the script with script engine.- Specified by:
execScriptin classAbstractScriptStore- Parameters:
triggerPV- the PV that triggers this execution.- Throws:
Exception
-
dispose
protected void dispose()Description copied from class:AbstractScriptStoreDispose of all resources allocated by this script store.- Overrides:
disposein classAbstractScriptStore
-