JNative v1.3 project : see http://jnative.sf.net


org.xvolks.jnative.util
Interface Callback

All Known Implementing Classes:
EnumCallback

public interface Callback

$Id: Callback.java,v 1.6 2006/12/07 21:44:31 mdenty Exp $

Callback.java

This software is released under the LGPL.


Method Summary
 int callback(long[] values)
          Method callback
 int getCallbackAddress()
          This method should call JNative.createCallback() AND MUST allow multiple calls Something like : abstract class MyCallback implements Callback { private int myAddress = -1; public int getCallbackAddress() throws NativeException { if(myAddress == -1) { myAddress = JNative.createCallback(numParam, this); } return myAddress; } }
 

Method Detail

callback

int callback(long[] values)
Method callback

Parameters:
values - an long[]
Returns:
an int

getCallbackAddress

int getCallbackAddress()
                       throws NativeException
This method should call JNative.createCallback() AND MUST allow multiple calls

Something like :

 abstract class MyCallback implements Callback {
                private int myAddress = -1;
                public int getCallbackAddress() throws NativeException {
                        if(myAddress == -1) {
                                myAddress = JNative.createCallback(numParam, this);
                        }
                        return myAddress;
                }
 }
 

Returns:
the address of the callback function
Throws:
NativeException

JNative v1.3 project : see http://jnative.sf.net