1 package iotrmi.Java.sample;
3 import java.io.IOException;
4 import iotrmi.Java.IoTRMICall;
6 public class CallBack_Stub implements CallBackInterface {
11 private IoTRMICall rmiCall;
13 private String[] methodSignatures = {
22 public CallBack_Stub(int _port, String _address, int _rev) throws IOException {
24 rmiCall = new IoTRMICall(_port, _address, _rev, methodSignatures);
28 public int printInt() {
30 String sign = "intprintInt()";
31 Class<?> retType = int.class;
32 Class<?>[] paramCls = new Class<?>[] { };
33 Object[] paramObj = new Object[] { };
34 Object retObj = rmiCall.remoteCall(sign, retType, null, null, paramCls, paramObj);
39 public void setInt(int _i) {
41 String sign = "voidsetInt(int)";
42 Class<?> retType = void.class;
43 Class<?>[] paramCls = new Class<?>[] { int.class };
44 Object[] paramObj = new Object[] { _i };
45 rmiCall.remoteCall(sign, retType, null, null, paramCls, paramObj);
49 public static void main(String[] args) throws Exception {
52 String address = "localhost";
55 CallBack_Stub cbstub = new CallBack_Stub(port, address, rev);