Adding enum support for method argument; need to emulate the same functionality for...
[iot2.git] / iotjava / iotrmi / Java / sample / CallBack_Stub.java
index 3ec19d55f1ce663e3e62696afd4636a25e4bf378..8eb2acb6b643af2165141bade2bd8338876c3c08 100644 (file)
@@ -10,6 +10,8 @@ public class CallBack_Stub implements CallBackInterface {
         */
        private IoTRMICall rmiCall;
 
+       private int objectId = 0;       // Default value is 0
+
        /**
         * Constructors
         */
@@ -21,22 +23,22 @@ public class CallBack_Stub implements CallBackInterface {
 
        public int printInt() {
 
-               String sign = "intprintInt()";
+               int methodId = 0;
                Class<?> retType = int.class;
                Class<?>[] paramCls = new Class<?>[] { };
                Object[] paramObj = new Object[] { };
-               Object retObj = rmiCall.remoteCall(sign, retType, null, null, paramCls, paramObj);
+               Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
                return (int)retObj;
        }
 
 
        public void setInt(int _i) {
 
-               String sign = "voidsetInt(int)";
+               int methodId = 1;
                Class<?> retType = void.class;
                Class<?>[] paramCls = new Class<?>[] { int.class };
                Object[] paramObj = new Object[] { _i };
-               rmiCall.remoteCall(sign, retType, null, null, paramCls, paramObj);
+               rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
        }