Testing callbacks for Java and C++; fixing a few bugs; more bugs to tackle: 1) Need...
[iot2.git] / iotjava / iotrmi / Java / basics / TestClass.java
index a5c0c1136741b7388af085066173cca6acb61ef7..7031dc295681b66e4e3ee9b37f517b0a70692799 100644 (file)
@@ -20,6 +20,7 @@ public class TestClass implements TestClassInterface {
                intA = 1;
                floatB = 2;
                stringC = "345";
+               cblist = new ArrayList<CallBackInterfaceWithCallBack>();
        }
 
 
@@ -28,6 +29,7 @@ public class TestClass implements TestClassInterface {
                intA = _int;
                floatB = _float;
                stringC = _string;
+               cblist = new ArrayList<CallBackInterfaceWithCallBack>();
        }
 
 
@@ -40,13 +42,22 @@ public class TestClass implements TestClassInterface {
        }
 
 
-       /*public void registerCallback(CallBackInterfaceWithCallBack[] _cb) {
+       public void registerCallbackArray(CallBackInterfaceWithCallBack _cb[]) {
 
                for (CallBackInterfaceWithCallBack cb : _cb) {
                        cblist.add(cb);
-                       System.out.println("Registering callback object!");
+                       System.out.println("Registering callback objects in array!");
                }
-       }*/
+       }
+
+
+       public void registerCallbackList(List<CallBackInterfaceWithCallBack> _cb) {
+
+               for (CallBackInterfaceWithCallBack cb : _cb) {
+                       cblist.add(cb);
+                       System.out.println("Registering callback objects in list!");
+               }
+       }
 
 
        public int callBack() {