Modifier and Type | Method and Description |
---|---|
void |
closeRuntime()
Closes the runtime for the specified engine
|
Object |
executeFunction(String name,
Object... parameters)
Executes a javascript function and returns the result of that function
|
void |
executeScript(String script)
Read the functions of a given javascript file
|
E |
getEngine()
Getter for the runtime of the specified engine
|
void |
registerCallback(ISender sender,
PipeLineSession session)
Only used by J2V8, allows for senders to be called by the javascript function.
|
void |
setGlobalAlias(String alias) |
void |
setResultHandler(ResultHandler resultHandler)
Registers the result and error functions to be handled by the given result handler.
|
void |
startRuntime()
Initialize the runtime for the specified engine
|
void setGlobalAlias(String alias)
alias
- An identifier which describes the script(s) that are being executed.void startRuntime() throws JavascriptException
JavascriptException
void executeScript(String script) throws JavascriptException
script
- String containing the contents of the javascript file in which the function(s) to be executed are specified.JavascriptException
Object executeFunction(String name, Object... parameters) throws JavascriptException
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 configurationJavascriptException
void closeRuntime()
E getEngine()
void registerCallback(ISender sender, PipeLineSession session)
sender
- The sender given in the adapter configurationvoid setResultHandler(ResultHandler resultHandler)
resultHandler
- Object to handle results and errors.Copyright © 2023 Frank!Framework. All rights reserved.