1 package demo.policies; 2 3 import org.omg.CORBA.*; 4 5 public class GoodDayImpl 6 extends GoodDayPOA 7 { 8 private String location; 9 10 public GoodDayImpl( String location ) 11 { 12 this.location = location; 13 } 14 15 public String 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 e) 23 { 24 e.printStackTrace(); 25 } 26 return "Hello World, from " + location; 27 } 28 29 30 } 31 | Popular Tags |