Creating new directory for all Java benchmarks
[iot2.git] / benchmarks / Java / SpeakerController / RoomSmart_Stub.java
1 package SpeakerController;
2
3 import java.io.IOException;
4 import java.util.List;
5 import java.util.ArrayList;
6 import java.util.Arrays;
7 import iotrmi.Java.IoTRMICall;
8 import iotrmi.Java.IoTRMIObject;
9
10 import iotcode.interfaces.RoomSmart;
11
12 public class RoomSmart_Stub implements RoomSmart {
13
14         private IoTRMICall rmiCall;
15         private String callbackAddress;
16         private int[] ports;
17
18         private final static int objectId = 0;
19         
20
21         public RoomSmart_Stub(int _port, String _skeletonAddress, String _callbackAddress, int _rev, int[] _ports) throws Exception {
22                 callbackAddress = _callbackAddress;
23                 ports = _ports;
24                 rmiCall = new IoTRMICall(_port, _skeletonAddress, _rev);
25         }
26
27         public int getRoomID() {
28                 int methodId = 0;
29                 Class<?> retType = int.class;
30                 Class<?>[] paramCls = new Class<?>[] {  };
31                 Object[] paramObj = new Object[] {  };
32                 Object retObj = rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
33                 return (int)retObj;
34         }
35
36 }