public class JavetCallbackReceiver extends java.lang.Object implements IJavetCallbackReceiver
It is supposed to provide a common ground for customized V8 callback receiver.
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
COMMA
The constant COMMA.
|
protected V8Runtime |
v8Runtime
The V8 runtime.
|
| Constructor and Description |
|---|
JavetCallbackReceiver(V8Runtime v8Runtime)
Instantiates a new V8 callback receiver.
|
| Modifier and Type | Method and Description |
|---|---|
V8ValueArray |
echo(V8Value... args)
Echo the given V8 value array.
|
V8Value |
echo(V8Value arg)
Echo the given V8 value.
|
java.lang.String |
echoString(java.lang.String str)
Echo the input string.
|
java.lang.String |
echoString(V8Value... args)
Echo the input V8 value array.
|
java.lang.String |
echoString(V8Value arg)
Echo the input V8 value.
|
V8Runtime |
getV8Runtime() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMethod, getMethod, getMethod, getMethod, getMethod, getMethodVarargs, getMethodVarargsprotected static final java.lang.String COMMA
protected V8Runtime v8Runtime
public JavetCallbackReceiver(V8Runtime v8Runtime)
v8Runtime - the V8 runtime@CheckReturnValue public V8Value echo(V8Value arg) throws JavetException
arg - the argJavetException - the javet exception@CheckReturnValue public V8ValueArray echo(V8Value... args) throws JavetException
Note: Lifecycle of the input and return arrays is managed by the caller.
args - the argsJavetException - the javet exceptionpublic java.lang.String echoString(java.lang.String str)
str - the strpublic java.lang.String echoString(V8Value arg)
arg - the argpublic java.lang.String echoString(V8Value... args)
Note: Lifecycle of the input and return arrays is managed by the caller.
args - the argspublic V8Runtime getV8Runtime()
getV8Runtime in interface IJavetCallbackReceiver