public class EagerJsonInvocationImpl<T> extends InstanceBase implements Instance<T>
| Constructor and Description |
|---|
EagerJsonInvocationImpl(T instance,
Class<T> clazz) |
| Modifier and Type | Method and Description |
|---|---|
Instance |
field(String methodName)
Retrieves the instance held under the Field fieldName
|
String |
getJson() |
T |
getObject() |
Class<?> |
getObjectClass() |
void |
initializeCallbackChannel(long channelAddress)
Initialize a callback channel for this
Instance. |
Instance |
invoke(String methodName,
InvocationArg... arg)
Invokes a method of the instance of the class that is set for this
Instance |
void |
invokeAsync(long functionPointer,
String methodName,
InvocationArg... args)
Invokes asynchronously a method of the instance of the class that is set for this
Instance. |
Instance |
invokeStatic(String methodName,
InvocationArg... arg)
Invokes a static method of the class that is set for this
Instance |
void |
invokeToChannel(long channelAddress,
String methodName,
InvocationArg... args)
Invokes a method of the instance of the class that is set for this
Instance. |
cast, cloneInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcast, cloneInstancepublic Instance invoke(String methodName, InvocationArg... arg)
InstanceInstancepublic Instance invokeStatic(String methodName, InvocationArg... arg)
InstanceInstanceinvokeStatic in interface Instance<T>methodName - The static method namearg - The arguments to use for invoking the static methodInstance instance containing the result of the invocationpublic void invokeAsync(long functionPointer,
String methodName,
InvocationArg... args)
InstanceInstance.
The result of the invocation should be provided later using the performCallback method of a NativeCallbackSupport class.
Any possible returned objects from the actual synchronous invocation of the defined method will be dropped.invokeAsync in interface Instance<T>functionPointer - The address of the function pointer that will be used later in the native side in order to actually paerform the callback.methodName - The method nameargs - The arguments to use when invoking the callback method (the functionPointer)public void invokeToChannel(long channelAddress,
String methodName,
InvocationArg... args)
InstanceInstance.
The result of the invocation should be provided later using the doCallback method of a NativeCallbackToRustChannelSupport class.
Any possible returned objects from the actual synchronous invocation of the defined method will be dropped.invokeToChannel in interface Instance<T>channelAddress - The memory address of the channelmethodName - The method nameargs - The argumentspublic void initializeCallbackChannel(long channelAddress)
InstanceInstance.
The channel can be used by Java to send values to Rust using the doCallback method of a NativeCallbackToRustChannelSupport class.initializeCallbackChannel in interface Instance<T>channelAddress - The memory address of the channelpublic Instance field(String methodName)
Instancepublic T getObject()
getObject in interface ObjectValuepublic Class<?> getObjectClass()
getObjectClass in interface ObjectValueCopyright © 2020. All rights reserved.