KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > demo > dii > serverImpl


1 package demo.dii;
2
3 public class serverImpl
4     extends serverPOA
5 {
6     int long_number = 47;
7
8     public int long_number()
9     {
10     System.out.println("Returning " + long_number );
11     return long_number;
12     }
13
14     public void long_number( int l)
15     {
16     System.out.println("Setting to " + l );
17     long_number = l;
18     }
19
20     public void add(int i, int j, org.omg.CORBA.IntHolder JavaDoc r)
21     {
22     System.out.println("add: " + (i+j) );
23     r.value = i + j;
24     }
25
26     public void _notify( String JavaDoc msg )
27     {
28     System.out.println("Notify: " + msg );
29     }
30
31     public String JavaDoc writeNumber( int i )
32     {
33     System.out.println("Number: " + i );
34     return "Number written";
35     }
36
37     public String JavaDoc writeNumberWithEx( int i )
38     throws demo.dii.serverPackage.e
39     {
40     System.out.println("Throwing Exception " );
41     if( true )
42         throw new demo.dii.serverPackage.e("TestException");
43     return "Number written";
44     }
45 }
46
47
48
Popular Tags