1 7 8 package poker.presentation.login; 9 10 import com.lutris.appserver.server.httpPresentation.HttpPresentation; 12 import com.lutris.appserver.server.httpPresentation.HttpPresentationComms; 13 import com.lutris.appserver.server.httpPresentation.HttpPresentationException; 14 import com.lutris.util.KeywordValueException; 15 16 import poker.Poker; 17 import poker.spec.FortuneManager; 18 19 public class WelcomePresentation implements HttpPresentation { 20 21 22 public void run(HttpPresentationComms comms) 23 throws HttpPresentationException, KeywordValueException { 24 25 WelcomeHTML welcome; 26 welcome = (WelcomeHTML)comms.xmlcFactory.create(WelcomeHTML.class); 27 28 try{ 29 Poker mainApp = (Poker)comms.session.getSessionData().get("app"); 30 FortuneManager fortuneManager = mainApp.getFortuneManager(); 31 String fortune = fortuneManager.getFortune(); 32 welcome.setTextMessage(fortune); 33 }catch(Exception e){} 34 35 36 comms.response.writeDOM(welcome); 37 } 38 39 } 40 | Popular Tags |