/**
* Indicates if the communication is a receiving communication
*/
- boolean receiving;
+ protected boolean receiving;
+ /**
+ * Indicates if the communication is finished
+ */
+ protected boolean finished = false;
/**
* Represents the bind between the java comm and the
* native C comm. You must never access it, since it is
/**
* Represents the bind for the task object pointer. Don't touch it.
*/
- public long bindTask = 0;
+ public long taskBind = 0;
/**
* Task associated with the comm. Beware, it can be null
*/
* Finalize the communication object, destroying it.
*/
protected void finalize() throws Throwable {
- unbind();
+ destroy();
}
/**
* Unbind the communication object
*/
- public native void unbind() throws NativeException;
+ protected native void destroy() throws NativeException;
/**
* Returns if the communication is finished or not.
* If the communication has finished and there was an error,
public Task getTask() {
return task;
}
-
+
+ /**
+ * Class initializer, to initialize various JNI stuff
+ */
+ public static native void nativeInit();
+ static {
+ nativeInit();
+ }
}