Initial rough sketch of JNI interface