*/
private IoTRMICall rmiCall;
- private String[] methodSignatures = {
-
- "intprintInt()",
- "voidsetInt(int)"
- };
+ private int objectId = 0; // Default value is 0
/**
* Constructors
*/
public CallBack_Stub(int _port, String _address, int _rev) throws IOException {
- rmiCall = new IoTRMICall(_port, _address, _rev, methodSignatures);
+ rmiCall = new IoTRMICall(_port, _address, _rev);
}
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);
}