Removing callback port feature from master and slave
[iot2.git] / benchmarks / drivers / Java / GPSPhoneGateway / GPSGatewaySmartCallback_CallbackStub.java
1 package iotcode.GPSPhoneGateway;
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.*;
11
12 public class GPSGatewaySmartCallback_CallbackStub implements GPSGatewaySmartCallback {
13
14         private IoTRMICall rmiCall;
15         private String callbackAddress;
16         private int[] ports;
17
18         private int objectId = 0;
19         
20
21         public GPSGatewaySmartCallback_CallbackStub(IoTRMICall _rmiCall, String _callbackAddress, int _objectId, int[] _ports) throws Exception {
22                 callbackAddress = _callbackAddress;
23                 objectId = _objectId;
24                 rmiCall = _rmiCall;
25                 ports = _ports;
26         }
27
28         public void newRoomIDRetrieved(int _roomIdentifier) {
29                 int methodId = 0;
30                 Class<?> retType = void.class;
31                 Class<?>[] paramCls = new Class<?>[] { int.class };
32                 Object[] paramObj = new Object[] { _roomIdentifier };
33                 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
34         }
35
36         public void newRingStatusRetrieved(boolean _ringStatus) {
37                 int methodId = 1;
38                 Class<?> retType = void.class;
39                 Class<?>[] paramCls = new Class<?>[] { boolean.class };
40                 Object[] paramObj = new Object[] { _ringStatus };
41                 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
42         }
43
44 }