Interface ScriptInvocationHandler
public interface ScriptInvocationHandler
Implementations can be registered with a ScriptableDataSet to be called before and after script contained in a data
set field is executed. This can be used to add commonly used import statements for all scripts of a given language or
to post-process the result of a script execution.
Implementations must define a default constructor, if they shall be used as standard handler for a language.
-
Method Summary
Modifier and TypeMethodDescriptionMust return the name of the scripting language for which this handler can be registered, as expected by the JSR 223 scripting engine manager, e.g.postInvoke(Object object) Will be called after a script contained in a field of a data set is executed.Will be called before a script contained in a field of a data set is executed.voidsetScriptEngine(ScriptEngine engine) Makes the scripting engine available to handler implementations.
-
Method Details
-
getLanguageName
String getLanguageName()Must return the name of the scripting language for which this handler can be registered, as expected by the JSR 223 scripting engine manager, e.g. "jruby".- Returns:
- The name of the scripting language.
-
preInvoke
-
postInvoke
-
setScriptEngine
Makes the scripting engine available to handler implementations.- Parameters:
engine- The scripting engine used to execute the current script.
-