feat: runtime

This commit is contained in:
Orion Kindel
2023-04-08 22:54:04 -07:00
parent 7eef137bcd
commit b400124096
9 changed files with 139 additions and 48 deletions

View File

@@ -5,10 +5,18 @@ import java.util.Optional;
public class Runtime {
static {
System.loadLibrary("toad_java_glue");
}
private final long addr;
private static native long init(RuntimeOptions o);
private native Optional<MessageRef> pollReq(RuntimeOptions o);
private native Optional<MessageRef> pollReq();
public static Runtime getOrInit(RuntimeOptions o) {
return new Runtime(o);
}
public Runtime(RuntimeOptions o) {
this.addr = Runtime.init(o);