-/* String[] methodSignatures = TestClass_CBSkeleton.getMethodSignatures();
- IoTRMIObject rmiObj = new IoTRMIObject(port, methodSignatures);
- Map<Integer,TestClassInterface> mapCBObject = new HashMap<Integer,TestClassInterface>();
-
- // Can replace for-loop with while-loop if necessary
- for (int i = 1; i < 3; i++) {
- TestClassInterface tcSkel = new TestClass_CBSkeleton(tc, i);
- mapCBObject.put(i, tcSkel);
- }
-
- Object retObj = null;
- while (true) {
- byte[] method = rmiObj.getMethodBytes();
- int objId = IoTRMIObject.getObjectId(method);
- TestClass_CBSkeleton tcSkel = (TestClass_CBSkeleton) mapCBObject.get(objId);
- if (tcSkel != null) {
- rmiObj.setMethodBytes(method);
- retObj = tcSkel.invokeMethod(rmiObj);
- }
- if (retObj != null) {
- rmiObj.sendReturnObj(retObj);
- }
- }
-*/
- //int objectId = 1;
- //System.out.println("Creating 0 object");
- //TestClass_Skeleton tcSkel1 = new TestClass_Skeleton(tc, rmiObj, objectId);
- //System.out.println("Creating 1 object");
- //objectId = 2;
- //TestClass_Skeleton tcSkel2 = new TestClass_Skeleton(tc, rmiObj, objectId);
- //System.out.println("Creating 2 object");
-
- /*for (int i = 1; i < 3; i++) {
- final int objectId = i;
- Thread thread = new Thread() {
- public void run() {
- try{
- TestClass_Skeleton tcSkel = new TestClass_Skeleton(tc, rmiObj, objectId);
- } catch (Exception ex){
- ex.printStackTrace();
- throw new Error("Error instantiating class CallBack_Skeleton!");
- }
- }
- };
- thread.start();
- }*/