1 19 20 package com.lutris.airsent; 21 22 import com.lutris.appserver.server.*; 23 import com.lutris.appserver.server.httpPresentation.*; 24 import com.lutris.appserver.server.session.*; 25 import com.lutris.util.*; 26 import com.lutris.airsent.spec.*; 27 28 33 public class AirSent extends StandardApplication { 34 35 protected boolean useServerPush = false; 36 37 41 42 52 public void startup(Config appConfig) 53 throws ApplicationException { 54 55 super.startup(appConfig); 56 57 try { 58 59 60 HomeManager homeManager = HomeManagerFactory.getHomeManager("com.lutris.airsent.business.HomeManagerImpl"); 61 62 homeManager.initialize(appConfig); 63 64 65 setAirSentConfig(appConfig); 66 67 } catch (Exception ex) { 68 } 69 } 70 71 83 public boolean requestPreprocessor(HttpPresentationComms comms) 84 throws Exception { 85 86 return super.requestPreprocessor(comms); 87 } 88 89 94 public HomeManager getHomeManager() 95 throws AirSentException { 96 97 HomeManager homeManager = HomeManagerFactory.getHomeManager("com.lutris.airsent.business.HomeManagerImpl"); 98 return homeManager.getInst(); 99 100 101 } 102 103 111 public String toHtml() { 112 return "This is <I>AirSent</I>"; 113 } 114 115 121 private void setAirSentConfig(Config config) throws AirSentException{ 122 123 try { 124 KeywordValueTable section = config.getSection("AirSentConfig"); 126 useServerPush = Boolean.getBoolean(section.getString("ServerPush")); 127 128 } catch (Exception ex) { 129 throw new AirSentException("Error configuring AirSent:", ex); 130 } 131 } 132 133 134 135 142 public boolean useServerPush() { 143 144 return useServerPush; 145 } 146 147 } 148 149 | Popular Tags |