MCPcopy Index your code
hub / github.com/ccxt/ccxt / scheduleCallback

Method scheduleCallback

java/lib/src/main/java/io/github/ccxt/Exchange.java:1844–1852  ·  view source on GitHub ↗

Schedule a method-name callback on the virtual executor after a delay. Used by WS transpile output to replace TS `this.delay(ms, "name", ...args)`. Method params are effectively final so this avoids lambda-capture errors an inline spawn rewrite would hit with reassignable locals.

(Object delayMs, String methodName, Object... args)

Source from the content-addressed store, hash-verified

1842 * an inline spawn rewrite would hit with reassignable locals.
1843 */
1844 public void scheduleCallback(Object delayMs, String methodName, Object... args) {
1845 this.spawn(() -> {
1846 try {
1847 Thread.sleep(((Number) delayMs).longValue());
1848 Helpers.callDynamically(this, methodName, args);
1849 } catch (Exception ignored) {
1850 }
1851 });
1852 }
1853
1854 /**
1855 * Start an async method-name call on the virtual executor and return a

Callers 15

authenticateMethod · 0.80
keepAliveListenKeyMethod · 0.80
authenticateMethod · 0.80
keepAliveListenKeyMethod · 0.80
authenticateMethod · 0.80
keepAliveListenKeyMethod · 0.80
handleOrderBookMethod · 0.80
authenticateMethod · 0.80
keepAliveListenKeyMethod · 0.80
keepAliveListenKeyMethod · 0.80
authenticateMethod · 0.80

Calls 3

spawnMethod · 0.95
callDynamicallyMethod · 0.95
sleepMethod · 0.45

Tested by

no test coverage detected