Package com.kenai.jffi
Class ClosurePool.Proxy
- java.lang.Object
-
- com.kenai.jffi.ClosurePool.Proxy
-
- Enclosing class:
- ClosurePool
static final class ClosurePool.Proxy extends java.lang.ObjectThis is a proxy passed to the native code, to be called by the native trampoline code.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CallContextcallContextKeep references to the return and parameter types so they do not get garbage collected until the closure does.(package private) Closureclosure(package private) static java.lang.reflect.MethodMETHOD
-
Constructor Summary
Constructors Constructor Description Proxy(CallContext callContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.reflect.MethodgetMethod()Gets the Method to be invoked by native codevoidinvoke(long retvalAddress, long paramAddress)Invoked by the native closure trampoline to execute the java side of the closure.
-
-
-
Field Detail
-
METHOD
static final java.lang.reflect.Method METHOD
-
callContext
final CallContext callContext
Keep references to the return and parameter types so they do not get garbage collected until the closure does.
-
closure
volatile Closure closure
-
-
Constructor Detail
-
Proxy
Proxy(CallContext callContext)
-
-
Method Detail
-
getMethod
private static java.lang.reflect.Method getMethod()
Gets the Method to be invoked by native code- Returns:
- The method to be invoked by native code
-
invoke
public void invoke(long retvalAddress, long paramAddress)Invoked by the native closure trampoline to execute the java side of the closure.- Parameters:
retvalAddress- The address of the native return value bufferparamAddress- The address of the native parameter buffer.
-
-