public interface Runtime extends EventEmitter
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close the current runtime and shutdown all the engine related resources.
|
void |
config(io.vertx.core.json.JsonObject config)
passes the given configuration to the runtime.
|
void |
enter()
explicitly enter the script engine scope.
|
default org.graalvm.polyglot.Value |
eval(java.lang.String script)
Evals a given sript string.
|
default org.graalvm.polyglot.Value |
eval(java.lang.String script,
boolean interactive)
Evals a given sript string.
|
default org.graalvm.polyglot.Value |
eval(java.lang.String script,
java.lang.String name,
boolean literal)
Evals a given sript string.
|
org.graalvm.polyglot.Value |
eval(java.lang.String script,
java.lang.String name,
java.lang.String contentType,
boolean interactive)
Evals a given sript string.
|
void |
leave()
explicitly leave the script engine scope.
|
org.graalvm.polyglot.Value |
main(java.lang.String main)
Requires the main module as a commonjs module, the
module returned will be flagged as a main module.
|
void |
put(java.lang.String name,
java.lang.Object value)
Puts a value to the global scope.
|
org.graalvm.polyglot.Value |
require(java.lang.String module)
Require a module following the commonjs spec
|
org.graalvm.polyglot.Value |
worker(java.lang.String main,
java.lang.String address)
Loads a JS Worker, meaning it will become a Vert.x Worker.
|
emit, onvoid config(io.vertx.core.json.JsonObject config)
config - given configuration.org.graalvm.polyglot.Value require(java.lang.String module)
module - a moduleorg.graalvm.polyglot.Value main(java.lang.String main)
main - the main moduleorg.graalvm.polyglot.Value worker(java.lang.String main,
java.lang.String address)
main - the main entry scriptaddress - the eventbus addressdefault org.graalvm.polyglot.Value eval(java.lang.String script,
boolean interactive)
throws java.lang.Exception
script - string containing code.interactive - literals are non listed on debug sessionsjava.lang.Exception - on errororg.graalvm.polyglot.Value eval(java.lang.String script,
java.lang.String name,
java.lang.String contentType,
boolean interactive)
throws java.lang.Exception
script - string containing code.name - string containing name of the script (e.g.: the filename).interactive - literals are non listed on debug sessionsjava.lang.Exception - on errordefault org.graalvm.polyglot.Value eval(java.lang.String script,
java.lang.String name,
boolean literal)
throws java.lang.Exception
script - string containing code.name - string containing name of the script (e.g.: the filename).literal - literals are non listed on debug sessionsjava.lang.Exception - on errordefault org.graalvm.polyglot.Value eval(java.lang.String script)
throws java.lang.Exception
script - string containing code.java.lang.Exception - on errorvoid put(java.lang.String name,
java.lang.Object value)
name - the key to identify the value in the global scopevalue - the value to store.void enter()
void leave()
void close()
Copyright © 2019. All Rights Reserved.