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


org.xvolks.test.callbacks
Class EnumCallback

java.lang.Object
  extended by org.xvolks.test.callbacks.EnumCallback
All Implemented Interfaces:
Callback

public class EnumCallback
extends java.lang.Object
implements Callback

$Id: EnumCallback.java,v 1.5 2006/10/15 10:24:52 mdenty Exp $ This software is released under the LGPL.


Constructor Summary
EnumCallback()
           
 
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; } }
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnumCallback

public EnumCallback()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

callback

public int callback(long[] values)
Method callback

Specified by:
callback in interface Callback
Parameters:
values - an long[]
Returns:
an int

getCallbackAddress

public int getCallbackAddress()
                       throws NativeException
Description copied from interface: Callback
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;
                }
 }
 

Specified by:
getCallbackAddress in interface Callback
Returns:
the address of the callback function
Throws:
NativeException

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