Class DefaultJavascriptEngineExecutor
java.lang.Object
org.eclipse.dirigible.engine.api.resource.AbstractResourceExecutor
org.eclipse.dirigible.engine.api.script.AbstractScriptExecutor
org.eclipse.dirigible.engine.js.api.AbstractJavascriptExecutor
org.eclipse.dirigible.engine.js.processor.DefaultJavascriptEngineExecutor
- All Implemented Interfaces:
IEngineExecutor,IResourceExecutor,IScriptEngineExecutor,IJavascriptEngineExecutor
public class DefaultJavascriptEngineExecutor extends AbstractJavascriptExecutor implements IJavascriptEngineExecutor
The Default Javascript Engine Executor.
-
Field Summary
Fields Modifier and Type Field Description static StringENGINE_NAMEThe Constant ENGINE_NAME.Fields inherited from class org.eclipse.dirigible.engine.js.api.AbstractJavascriptExecutor
MODULE_EXT_GRAALVM, MODULE_EXT_JS, MODULE_EXT_MJS, MODULE_EXT_NASHORN, MODULE_EXT_RHINO, MODULE_EXT_V8Fields inherited from interface org.eclipse.dirigible.engine.js.api.IJavascriptEngineExecutor
CONSOLE, CONTEXT, DIRIGIBLE_JAVASCRIPT_DEBUG_ENABLED, DIRIGIBLE_JAVASCRIPT_ENGINE_TYPE_DEFAULT, DIRIGIBLE_JAVASCRIPT_ENGINE_TYPE_HEADER, JAVASCRIPT_ENGINE_TYPE, JAVASCRIPT_TYPE_DEFAULT, JAVASCRIPT_TYPE_GRAALIUM, JAVASCRIPT_TYPE_GRAALVM -
Constructor Summary
Constructors Constructor Description DefaultJavascriptEngineExecutor() -
Method Summary
Modifier and Type Method Description ObjectevalCode(String code, Map<Object,Object> executionContext)Eval code.ObjectevalModule(String module, Map<Object,Object> executionContext)Eval module.ObjectexecuteMethodFromModule(String module, String memberClass, String memberClassMethod, Map<Object,Object> executionContext)Execute method from module.ObjectexecuteServiceCode(String code, Map<Object,Object> executionContext)Execute service code.ObjectexecuteServiceModule(String module, Map<Object,Object> executionContext)Execute service module.StringgetName()Gets the name.StringgetType()Gets the type.Methods inherited from class org.eclipse.dirigible.engine.js.api.AbstractJavascriptExecutor
forceFlushMethods inherited from class org.eclipse.dirigible.engine.api.script.AbstractScriptExecutor
existsModule, existsModule, generateResourcePath, getResourcePath, retrieveModule, retrieveModuleMethods inherited from class org.eclipse.dirigible.engine.api.resource.AbstractResourceExecutor
createResourcePath, createResourcePath, existResource, existResource, getCollection, getLoadedPredeliveredContent, getRepository, getResource, getResource, getResourceContent, getResourceContentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.dirigible.engine.api.script.IScriptEngineExecutor
existsModule, existsModule, retrieveModule, retrieveModule
-
Field Details
-
ENGINE_NAME
The Constant ENGINE_NAME.- See Also:
- Constant Field Values
-
-
Constructor Details
-
DefaultJavascriptEngineExecutor
public DefaultJavascriptEngineExecutor()
-
-
Method Details
-
getType
Gets the type.- Specified by:
getTypein interfaceIEngineExecutor- Returns:
- the type
-
getName
Gets the name.- Specified by:
getNamein interfaceIEngineExecutor- Returns:
- the name
-
executeServiceModule
public Object executeServiceModule(String module, Map<Object,Object> executionContext) throws ScriptingExceptionExecute service module.- Specified by:
executeServiceModulein interfaceIJavascriptEngineExecutor- Specified by:
executeServiceModulein interfaceIScriptEngineExecutor- Parameters:
module- the moduleexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
executeServiceCode
public Object executeServiceCode(String code, Map<Object,Object> executionContext) throws ScriptingExceptionExecute service code.- Specified by:
executeServiceCodein interfaceIScriptEngineExecutor- Parameters:
code- the codeexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
evalCode
public Object evalCode(String code, Map<Object,Object> executionContext) throws ScriptingExceptionEval code.- Specified by:
evalCodein interfaceIScriptEngineExecutor- Parameters:
code- the codeexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
evalModule
public Object evalModule(String module, Map<Object,Object> executionContext) throws ScriptingExceptionEval module.- Specified by:
evalModulein interfaceIScriptEngineExecutor- Parameters:
module- the moduleexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
executeMethodFromModule
public Object executeMethodFromModule(String module, String memberClass, String memberClassMethod, Map<Object,Object> executionContext)Execute method from module.- Specified by:
executeMethodFromModulein interfaceIScriptEngineExecutor- Parameters:
module- the modulememberClass- the member classmemberClassMethod- the member class methodexecutionContext- the execution context- Returns:
- the object
-