Preparing files, stubs, and skeletons for 2nd benchmark
[iot2.git] / benchmarks / drivers / WeatherPhoneGateway / WeatherGatewaySmartCallback_CallbackStub.java
1 package iotcode.WeatherPhoneGateway;
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 WeatherGatewaySmartCallback_CallbackStub implements WeatherGatewaySmartCallback {
13
14         private IoTRMICall rmiCall;
15         private String callbackAddress;
16         private int[] ports;
17
18         private int objectId = 0;
19         
20
21         public WeatherGatewaySmartCallback_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 informationRetrieved(double _inchesPerWeek, int _weatherZipCode, int _daysToWaterOn, double _inchesPerMinute) {
29                 int methodId = 0;
30                 Class<?> retType = void.class;
31                 Class<?>[] paramCls = new Class<?>[] { double.class, int.class, int.class, double.class };
32                 Object[] paramObj = new Object[] { _inchesPerWeek, _weatherZipCode, _daysToWaterOn, _inchesPerMinute };
33                 rmiCall.remoteCall(objectId, methodId, retType, null, paramCls, paramObj);
34         }
35
36 }