KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > demo > policies > GoodDayImpl


1 package demo.policies;
2
3 import org.omg.CORBA.*;
4
5 public class GoodDayImpl
6     extends GoodDayPOA
7 {
8     private String JavaDoc location;
9
10     public GoodDayImpl( String JavaDoc location )
11     {
12         this.location = location;
13     }
14
15     public String JavaDoc hello(int sleep)
16     {
17         System.out.println("Hello goes to sleep for " + sleep + " msecs.");
18         try
19         {
20             Thread.currentThread().sleep(sleep);
21         }
22         catch( Exception JavaDoc e)
23         {
24             e.printStackTrace();
25         }
26         return "Hello World, from " + location;
27     }
28
29
30 }
31
Popular Tags