com.neva
Class JCallback

java.lang.Object
  |
  +--com.neva.JCallback

public class JCallback
extends java.lang.Object

The JCallback class provides a mechanism for external functions to call into Java


Field Summary
static int CC_cdecl
          Specifies __cdecl calling convention
static int CC_stdcall
          Specifies __stdcall calling convention
 
Method Summary
 int asWin32Callback()
          Builds a callable wrapper around Java method and answers its address.
 java.lang.Object getPrivateData()
          Gets an object previously stored by setPrivateData()
 java.lang.Object getThis()
          Gets an object previously stored by setThis()
 void release()
          Releases the memory occupied by the callable wrapper
 void setCallback(java.lang.String method, int argc)
          Defines callback properties.
 void setCallback(java.lang.String method, int argc, int cc)
          Defines callback properties
 void setPrivateData(java.lang.Object obj)
          Sets an arbitrary object that can be accessed from within the callback method
 void setThis(java.lang.Object _this)
          Sets an arbitrary object that can be accessed from within the callback method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CC_cdecl

public static int CC_cdecl
Specifies __cdecl calling convention


CC_stdcall

public static int CC_stdcall
Specifies __stdcall calling convention

Method Detail

asWin32Callback

public final int asWin32Callback()
                          throws java.lang.NoSuchMethodError
Builds a callable wrapper around Java method and answers its address.

Throws:
java.lang.NoSuchMethodError

getPrivateData

public final java.lang.Object getPrivateData()
Gets an object previously stored by setPrivateData()


getThis

public final java.lang.Object getThis()
Gets an object previously stored by setThis()


release

public final void release()
Releases the memory occupied by the callable wrapper


setCallback

public final void setCallback(java.lang.String method,
                              int argc)
Defines callback properties. Standard Win32 API calling convention __stdcall assumed

Parameters:
method - specifies the name of the method. The method must be implemented by this object
argc - specifies the number of 32-bit integer arguments

setCallback

public final void setCallback(java.lang.String method,
                              int argc,
                              int cc)
Defines callback properties

Parameters:
method - specifies the name of the method. The method must be implemented by this object
argc - specifies the number of 32-bit integer arguments
cc - specifies the calling convention

setPrivateData

public final void setPrivateData(java.lang.Object obj)
Sets an arbitrary object that can be accessed from within the callback method


setThis

public final void setThis(java.lang.Object _this)
Sets an arbitrary object that can be accessed from within the callback method