5f731daa5e549d8edc4031943887053e0519fc3c
[iot2.git] / iotjava / iotrmi / Java / basics / CallBack.java
1
2 public class CallBack implements CallBackInterface {
3
4         /**
5          * Class Properties
6          */
7         private int intA;
8
9         /**
10          * Constructors
11          */
12         public CallBack(int _i) {
13
14                 intA = _i;
15         }
16
17
18         public int printInt() {
19
20                 System.out.println("Integer: " + intA);
21                 return intA;
22         }
23
24
25         public void setInt(int _i) {
26
27                 intA = _i;
28         }
29         
30         
31         public void needCallback(TestClassComplete tc) {
32
33                 //System.out.println("Going to invoke getShort()!");
34                 //for(int i=0; i<10; i++)
35                 System.out.println("Short from TestClass: " + tc.getShort((short)1234));
36         }
37 }