import java.util.Date; import SimpleHelloWorld.*; /** * This is an implementation of SimpleHelloWorld */ public class ExampleGoodDayImpl extends SimpleHelloWorld._GoodDayImplBase { /** Constructor */ public ExampleGoodDayImpl() { super(); } /////////////////////////////////////////////////////////////////////// //// public methods //// /** Say Hell and return date and time. */ public String hell( org.omg.CORBA.ShortHolder hour, org.omg.CORBA.ShortHolder minute) { Date date = new Date(); hour.value = (short) date.getHours(); minute.value = (short) date.getMinutes(); return "What the hell are you doing?"; } /** Say Hello. */ public String hello() { return "Hello, world!"; } /** Throw an exception, always. */ public void dontCallMe() throws DontCallMeException { throw new DontCallMeException("I've told you so..."); } }