Making classes final to make inheritance impossible
[iot2.git] / iotjava / iotrmi / Java / IoTRMICall.java
index bf5d9dcf3e44d012b640172b588ab272cd653485..b3f9108667b9edb16d1417fc65c0d99453dd77c3 100644 (file)
@@ -23,7 +23,7 @@ import java.util.Set;
  * @version     1.0
  * @since       2016-10-04
  */
-public class IoTRMICall {
+public final class IoTRMICall {
 
 
        /**
@@ -31,7 +31,6 @@ public class IoTRMICall {
         */
        private IoTRMIUtil rmiUtil;
        private IoTSocketClient rmiClient;
-       //private List<String> listMethodId;    // Map from method ID to signature
 
 
        /**
@@ -169,51 +168,4 @@ public class IoTRMICall {
 
                return retObj;
        }
-
-
-       public static void main(String[] args) throws Exception {
-
-               String[] test = { "123", "456", "789" };
-               byte[] b = IoTRMIUtil.getObjectBytes(test);
-
-               Boolean[] test2 = new Boolean[] { true, false, false };
-               byte[] b2 = IoTRMIUtil.getObjectBytes(test2);
-
-               System.out.println(Arrays.toString(b));
-               System.out.println(Arrays.toString(b2));
-
-               String[] c = (String[]) IoTRMIUtil.getParamObjectArray(String[].class, b);
-               System.out.println(Arrays.toString(c));
-
-               Boolean[] c2 = (Boolean[]) IoTRMIUtil.getParamObjectArray(Boolean[].class, b2);
-               System.out.println(Arrays.toString(c2));
-
-               IoTRMICall rmiCall = new IoTRMICall(1234, "localhost", 0);
-               byte[] retObjBytes = { 0, 0, 4, -46, 0, 0, 0, 10, 116, 101, 115, 116, 115, 116, 114, 105, 110, 103, 0, 0, 21, 56 };
-               //Class<?>[] retCls = new Class<?>[] { int.class, String.class, int.class };
-               Object[] retObj = rmiCall.getReturnObjects(retObjBytes, new Class<?>[] { int.class, String.class, int.class },
-                       new Class<?>[] { null, null, null });
-               System.out.println("Ret object 1: " + retObj[0]);
-               System.out.println("Ret object 2: " + retObj[1]);
-               System.out.println("Ret object 3: " + retObj[2]);
-
-               // List
-               /*List<Long> list = new ArrayList<Long>();
-               list.add(12345678l);
-               list.add(23455432l);
-               list.add(34566543l);
-
-               byte[] objBytes = IoTRMIUtil.getObjectBytes(list);
-               System.out.println(Arrays.toString(objBytes));
-               Object obj = IoTRMIUtil.getParamObject(List.class, null, Long.class, objBytes);
-
-               @SuppressWarnings("unchecked")
-               List<Long> listStr = (List<Long>) obj;
-               System.out.println("List: " + listStr.toString());*/
-
-               //@SuppressWarnings("unchecked")
-               //List<Long> listStr = (List<Long>) obj;
-               //System.out.println("List: " + listStr.toString());
-
-       }
 }