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;
16 public CallBack_Stub(int _port, String _address, int _rev) throws IOException {
18 rmiCall = new IoTRMICall(_port, _address, _rev);
22 public int printInt() {
24 String sign = "intprintInt()";
25 Class<?> retType = int.class;
26 Class<?>[] paramCls = new Class<?>[] { };
27 Object[] paramObj = new Object[] { };
28 Object retObj = rmiCall.remoteCall(sign, retType, null, null, paramCls, paramObj);
33 public void setInt(int _i) {
35 String sign = "voidsetInt(int)";
36 Class<?> retType = void.class;
37 Class<?>[] paramCls = new Class<?>[] { int.class };
38 Object[] paramObj = new Object[] { _i };
39 rmiCall.remoteCall(sign, retType, null, null, paramCls, paramObj);
43 public static void main(String[] args) throws Exception {
46 String address = "localhost";
49 CallBack_Stub cbstub = new CallBack_Stub(port, address, rev);