Package org.webharvest.runtime.scripting
Interface ScriptEngine
-
- All Known Implementing Classes:
JSRScriptEngineAdapter
public interface ScriptEngine
Interface providing scripting functionality. Allows for execution of scripts written in various languages. All scripting language engines supported by Web Harvest are expected to implement this interface.- Since:
- 2.1.0-SNAPSHOT
- Version:
- %I%, %G%
- Author:
- Piotr Dyraga
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
evaluate(DynamicScopeContext context, ScriptSource script)
Executes script provided inScriptSource
.
-
-
-
Method Detail
-
evaluate
Object evaluate(DynamicScopeContext context, ScriptSource script)
Executes script provided inScriptSource
. Additionally, all variables defined inDynamicScopeContext
are copied to the script engine context, so that they are accessible within the script.- Parameters:
context
- notnull
reference to the currentDynamicScopeContext
script
- notnull
ScriptSource
representing script which is going to be executed- Returns:
- result of the script execution
-
-