-
- public Object invokeMethod(IoTRMIObject rmiObj) throws IOException {
-
- String methodSign = rmiObj.getSignature();
- Object[] paramObj = null;
- Object retObj = null;
-
- if (methodSign.equals("intprintInt()")) {
- retObj = printInt();
- } else if (methodSign.equals("voidsetInt(int)")) {
- paramObj = rmiObj.getMethodParams(new Class<?>[] { int.class },
- new Class<?>[] { null }, new Class<?>[] { null });
- setInt((int) paramObj[0]);
- } else
- throw new Error("Signature not recognized!");
- System.out.println("Return object: " + retObj);
-
- return retObj;
- }
-
-
- // Return method signatures
- public static String[] getMethodSignatures() {
-
- return methodSignatures;
- }
-
-