Advertisement
Brord

Actor class

Dec 9th, 2021
842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.30 KB | None | 0 0
  1. // Automatically generated by flapigen
  2. package org.iota.wallet;
  3.  
  4.  
  5. public final class Actor {
  6.  
  7.     private Actor() {}
  8.  
  9.     public static native void iotaInitialize(ActorCallback cb, String actor_id, String storage_path);
  10.  
  11.     public static native void iotaDestroy(String actor_id);
  12.  
  13.     public static native void iotaSendMessage(String message);
  14.  
  15.     public static void iotaListen(String actor_id, String id, EventType event) {
  16.         int a2 = event.getValue();
  17.         do_iotaListen(actor_id, id, a2);
  18.  
  19.         JNIReachabilityFence.reachabilityFence1(event);
  20.     }
  21.     private static native void do_iotaListen(String actor_id, String id, int event);
  22.  
  23.     public static native void iotaInitLogger(String file_name);
  24.  
  25.     public synchronized void delete() {
  26.         if (mNativeObj != 0) {
  27.             do_delete(mNativeObj);
  28.             mNativeObj = 0;
  29.        }
  30.     }
  31.     @Override
  32.     protected void finalize() throws Throwable {
  33.         try {
  34.             delete();
  35.         }
  36.         finally {
  37.              super.finalize();
  38.         }
  39.     }
  40.     private static native void do_delete(long me);
  41.     /*package*/ Actor(InternalPointerMarker marker, long ptr) {
  42.         assert marker == InternalPointerMarker.RAW_PTR;
  43.         this.mNativeObj = ptr;
  44.     }
  45.     /*package*/ long mNativeObj;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement