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.Object
This 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) CallContext
callContext
Keep references to the return and parameter types so they do not get garbage collected until the closure does.(package private) Closure
closure
(package private) static java.lang.reflect.Method
METHOD
-
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.Method
getMethod()
Gets the Method to be invoked by native codevoid
invoke(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.
-
-