Package org.frankframework.javascript
Class GraalJS
java.lang.Object
org.frankframework.javascript.GraalJS
- All Implemented Interfaces:
JavascriptEngine<ScriptEngine>
Deprecated.
Javascript engine implementation of GraalJS. If high performance execution of JavaScript code is required, enable the following JVM options:
"-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI" or use the GraalVM Java distribution. Otherwise, the Javascript code is interpreted on every execution.
GraalJS is in Beta phase, so it is not supported by Frank!Framework yet.
- Since:
- 8.2
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Closes the runtime for the specified engineexecuteFunction
(String name, Object... parameters) Deprecated.Executes a javascript function and returns the result of that functionvoid
executeScript
(String script) Deprecated.Read the functions of a given javascript fileDeprecated.Getter for the runtime of the specified enginevoid
registerCallback
(ISender sender, PipeLineSession session) Deprecated.Allows for senders to be called by the Javascript function.void
setGlobalAlias
(String alias) Deprecated.void
setResultHandler
(ResultHandler resultHandler) Deprecated.Registers the result and error functions to be handled by the given result handler.void
Deprecated.Initialize the runtime for the specified engine
-
Constructor Details
-
GraalJS
public GraalJS()Deprecated.
-
-
Method Details
-
setGlobalAlias
Deprecated.- Specified by:
setGlobalAlias
in interfaceJavascriptEngine<ScriptEngine>
- Parameters:
alias
- An identifier which describes the script(s) that are being executed.
-
startRuntime
public void startRuntime()Deprecated.Description copied from interface:JavascriptEngine
Initialize the runtime for the specified engine- Specified by:
startRuntime
in interfaceJavascriptEngine<ScriptEngine>
-
executeScript
Deprecated.Description copied from interface:JavascriptEngine
Read the functions of a given javascript file- Specified by:
executeScript
in interfaceJavascriptEngine<ScriptEngine>
- Parameters:
script
- String containing the contents of the javascript file in which the function(s) to be executed are specified.- Throws:
JavascriptException
-
executeFunction
Deprecated.Description copied from interface:JavascriptEngine
Executes a javascript function and returns the result of that function- Specified by:
executeFunction
in interfaceJavascriptEngine<ScriptEngine>
- Parameters:
name
- The name of the javascript function as given in the javascript file.parameters
- An array containing the parameters for the javascript function, given in the adapter configuration- Returns:
- The result of the javascript function is returned.
- Throws:
JavascriptException
-
closeRuntime
public void closeRuntime()Deprecated.Description copied from interface:JavascriptEngine
Closes the runtime for the specified engine- Specified by:
closeRuntime
in interfaceJavascriptEngine<ScriptEngine>
-
getEngine
Deprecated.Description copied from interface:JavascriptEngine
Getter for the runtime of the specified engine- Specified by:
getEngine
in interfaceJavascriptEngine<ScriptEngine>
- Returns:
- Returns the runtime instance
-
registerCallback
Deprecated.Description copied from interface:JavascriptEngine
Allows for senders to be called by the Javascript function. Sender needs to be given in the adapter configuration, a Javascript function can call the sender, using the name of the sender as a function call.- Specified by:
registerCallback
in interfaceJavascriptEngine<ScriptEngine>
- Parameters:
sender
- The sender given in the adapter configuration
-
setResultHandler
Deprecated.Description copied from interface:JavascriptEngine
Registers the result and error functions to be handled by the given result handler.- Specified by:
setResultHandler
in interfaceJavascriptEngine<ScriptEngine>
- Parameters:
resultHandler
- Object to handle results and errors.
-