Working Java v.1.0 for arbitrary calls of callback objects
[iot2.git] / iotjava / iotrmi / Java / IoTRMIUtil.java
index f593a7ad4d277335c0e4c5c4ec093aa200750c4c..c4d383b829ee253cc82fc62d3fa826acbd4baa6c 100644 (file)
@@ -51,6 +51,18 @@ public class IoTRMIUtil {
        public final static int BYT_LEN = 1;
        public final static int BOL_LEN = 1;
 
+       /**
+        * Public static data structure to keep track of multiple skeletons and stubs
+        */
+       //public static IoTRMIObject rmiObj;
+       //public static IoTRMICall rmiCall;
+       //public static int objIdCounter = Integer.MAX_VALUE;
+       public static Integer objIdCounter = new Integer(Integer.MAX_VALUE);
+       public static Map<Integer,Object> mapStub = new HashMap<Integer,Object>();              // Map object to its stub ID
+       public static Map<Object,Object> mapSkel = new HashMap<Object,Object>();                // Map object to its skeleton
+       public static Map<Object,Integer> mapSkelId = new HashMap<Object,Integer>();    // Map object to its skeleton ID
+
+
        /**
         * Constructors
         */
@@ -67,6 +79,20 @@ public class IoTRMIUtil {
                                IoTRMITypes.nonPrimitivesJava, IoTRMITypes.nonPrimitivesCplus);
        }
 
+       
+       /*public static void initRMICall(int port, String address, int rev) throws IOException {
+               rmiCall = new IoTRMICall(port, address, rev);
+       }
+       
+       public static void initRMICall(int localPort, int port, String address, int rev) throws IOException {
+               rmiCall = new IoTRMICall(localPort, port, address, rev);
+       }
+       
+       public static void initRMIObject(int port) throws IOException, ClassNotFoundException, 
+                       InstantiationException, IllegalAccessException {
+               rmiObj = new IoTRMIObject(port);
+       }*/
+       
 
        /**
         * getHashCodeBytes() gets hash value (in bytes) from method name