Package org.cometd.javascript
Class JavaScript
- java.lang.Object
-
- org.cometd.javascript.JavaScript
-
-
Constructor Summary
Constructors Constructor Description JavaScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.graalvm.polyglot.Valuebindings()voiddestroy()<T> Tevaluate(String name, String code)<T> Tevaluate(URL url)<T> Tget(String key)voidinit()<T> Tinvoke(boolean sync, Object jsThis, Object function, Object... arguments)voidput(String key, Object value)voidrun()ScheduledFuture<?>schedule(Object jsThis, Object function, long delay)Invoked frombrowser.js.ScheduledFuture<?>scheduleWithFixedDelay(Object jsThis, Object function, long initialDelay, long delay)Invoked frombrowser.js.
-
-
-
Method Detail
-
bindings
public org.graalvm.polyglot.Value bindings()
-
init
public void init()
-
evaluate
public <T> T evaluate(URL url)
-
get
public <T> T get(String key)
-
schedule
public ScheduledFuture<?> schedule(Object jsThis, Object function, long delay)
Invoked frombrowser.js.- Parameters:
jsThis- the JavaScriptthisreferencefunction- the function to invoke after the given delaydelay- the delay after which the function is invoked, in milliseconds- Returns:
- a task representing the scheduled execution
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Object jsThis, Object function, long initialDelay, long delay)
Invoked frombrowser.js.- Parameters:
jsThis- the JavaScriptthisreferencefunction- the function to invoke after the given delayinitialDelay- the delay of the first execution, in millisecondsdelay- the delay after which the function is invoked, in milliseconds- Returns:
- a task representing the scheduled execution
-
-