Fixing bugs for multiple callback inputs; adding more testcases
[iot2.git] / benchmarks / original_interfaces / WeatherGateway.java
1 package iotcode.interfaces;
2
3 //RMI packages
4 import java.rmi.Remote;
5 import java.rmi.RemoteException;
6
7 // Checker annotations
8 import iotchecker.qual.NonLocalRemote;
9
10 /** Gateway public interface, e.g. for PhoneGateway
11  *
12  * @author      Rahmadi Trimananda <rahmadi.trimananda @ uci.edu>
13  * @version     1.0                
14  * @since       2016-04-26
15  */
16
17 public interface WeatherGateway extends Remote {
18
19         /** Method to start the gateway.
20          *
21          *   @param None.
22          *
23          *   @return None
24          */
25         public void start() throws RemoteException;
26
27
28         /** Method to stop the gateway.
29          *
30          *   @param None.
31          *
32          *   @return None
33          */
34         public void stop() throws RemoteException;
35
36
37         /** Method to initialize the gateway.
38          *
39          *   @return [void] None.
40          */
41         public void init() throws RemoteException;
42
43
44         /** Register an object to retrieve callbacks when new data is available.
45          *
46          *   @param _callbackTo [WeatherGatewayCallback].
47          *
48          *   @return [void] None.
49          */
50         public void registerCallback(@NonLocalRemote WeatherGatewayCallback _callbackTo) throws RemoteException;
51
52
53         /** Get inches per week data
54          *
55          *   @param None.
56          *
57          *   @return [double] Rainfall (inches per week).
58          */
59         public double getInchesPerWeek() throws RemoteException;
60
61
62         /** Get weather area zip code
63          *
64          *   @param None.
65          *
66          *   @return [int] Area zipcode.
67          */
68         public int getWeatherZipCode() throws RemoteException;
69
70
71         /** Days to keep watering the lawns
72          *
73          *   @param None.
74          *
75          *   @return [int] Number of days.
76          */
77         public int getDaysToWaterOn() throws RemoteException;
78
79
80         /** Get inches per minute data
81          *
82          *   @param None.
83          *
84          *   @return [double] Rainfall (inches per minute).
85          */
86         public double getInchesPerMinute() throws RemoteException;
87 }
88
89
90
91
92
93
94
95
96
97
98
99
100
101