feat: runtime
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user