public interface NativeInvocation<T> extends ObjectValue, JsonValue
| Modifier and Type | Method and Description |
|---|---|
static <T> NativeInvocation |
cast(NativeInvocation from,
String toClass)
Casts a the object that is contained in a NativeInvocation to an object of class clazz.
|
static <T> NativeInvocation |
cloneInstance(NativeInvocation from)
Clones a NativeInvocation
|
void |
initializeCallbackChannel(long channelAddress)
Initialize a callback channel for this
NativeInvocation. |
NativeInvocation |
invoke(String methodName,
InvocationArg... args)
Invokes a method of the instance of the class that is set for this
NativeInvocation |
void |
invokeAsync(long functionPointerAddress,
String methodName,
InvocationArg... args)
Invokes asynchronously a method of the instance of the class that is set for this
NativeInvocation. |
NativeInvocation |
invokeStatic(String methodName,
InvocationArg... args)
Invokes a static method of the class that is set for this
NativeInvocation |
void |
invokeToChannel(long channelAddress,
String methodName,
InvocationArg... args)
Invokes a method of the instance of the class that is set for this
NativeInvocation. |
getObject, getObjectClassNativeInvocation invoke(String methodName, InvocationArg... args)
NativeInvocationmethodName - The method nameargs - The arguments to use for invoking the methodNativeInvocation instance containing the result of the invocationNativeInvocation invokeStatic(String methodName, InvocationArg... args)
NativeInvocationmethodName - The static method nameargs - The arguments to use for invoking the static methodNativeInvocation instance containing the result of the invocationvoid invokeAsync(long functionPointerAddress,
String methodName,
InvocationArg... args)
NativeInvocation.
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.functionPointerAddress - 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)void invokeToChannel(long channelAddress,
String methodName,
InvocationArg... args)
NativeInvocation.
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.channelAddress - methodName - args - void initializeCallbackChannel(long channelAddress)
NativeInvocation.
The channel can be used by Java to send values to Rust using the doCallback method of a NativeCallbackToRustChannelSupport class.channelAddress - static <T> NativeInvocation cast(NativeInvocation from, String toClass)
T - Generically defined return typefrom - The NativeInvocation to cast.toClass - The class that the provided NativeInvocation should be casted toNativeInvocation instance containing the result of the cast.static <T> NativeInvocation cloneInstance(NativeInvocation from)
T - Generically defined return typefrom - The object to clone.NativeInvocation instance.Copyright © 2019. All rights reserved.