01: package demo.dii;
02:
03: public class serverImpl extends serverPOA {
04: int long_number = 47;
05:
06: public int long_number() {
07: System.out.println("Returning " + long_number);
08: return long_number;
09: }
10:
11: public void long_number(int l) {
12: System.out.println("Setting to " + l);
13: long_number = l;
14: }
15:
16: public void add(int i, int j, org.omg.CORBA.IntHolder r) {
17: System.out.println("add: " + (i + j));
18: r.value = i + j;
19: }
20:
21: public void _notify(String msg) {
22: System.out.println("Notify: " + msg);
23: }
24:
25: public String writeNumber(int i) {
26: System.out.println("Number: " + i);
27: return "Number written";
28: }
29:
30: public String writeNumberWithEx(int i)
31: throws demo.dii.serverPackage.e {
32: System.out.println("Throwing Exception ");
33: if (true)
34: throw new demo.dii.serverPackage.e("TestException");
35: return "Number written";
36: }
37: }
|