1 19 20 package com.sslexplorer.boot; 21 22 import java.io.File ; 23 import java.io.IOException ; 24 import java.net.URL ; 25 import java.util.Collection ; 26 import java.util.prefs.Preferences ; 27 28 import javax.net.ssl.TrustManager; 29 import javax.servlet.http.HttpServletRequest ; 30 import javax.servlet.http.HttpServletResponse ; 31 32 33 58 public interface Context { 59 60 enum HandlerProtocol { HTTPS_PROTOCOL, HTTP_PROTOCOL, BOTH_PROTOCOLS }; 61 62 67 public boolean isSetupMode(); 68 69 74 public boolean isRestartAvailableMode(); 75 76 81 public void shutdown(boolean restart); 82 83 84 89 public VersionInfo.Version getVersion(); 90 91 96 public File getConfDirectory(); 97 98 103 public File getTempDirectory(); 104 105 110 public File getLogDirectory(); 111 112 117 public File getDBDirectory(); 118 119 124 public File getApplicationDirectory(); 125 126 131 public Thread getMainThread(); 132 133 145 public void addResourceBase(URL url); 146 147 154 public void removeResourceBase(URL url); 155 156 161 public Collection <URL > getResourceBases(); 162 163 168 public String getHostname(); 169 170 177 public int getPort(); 178 179 185 public void addContextLoaderURL(URL u); 186 187 192 public void registerRequestHandler(RequestHandler requestHandler); 193 194 195 200 public void registerRequestHandler(RequestHandler requestHandler, HandlerProtocol protocol); 201 202 203 208 public void deregisterRequestHandler(RequestHandler requestHandler); 209 210 217 public String obfuscatePassword(String password); 218 219 226 public String deobfuscatePassword(String password); 227 228 234 public void setTrustMananger(TrustManager trustManager, boolean require); 235 236 244 public void addWebApp(String contextPathSpec, String webApp) throws Exception ; 245 246 251 public void addContextListener(ContextListener contextListener); 252 253 258 public void removeContextListener(ContextListener contextListener); 259 260 266 public Preferences getPreferences(); 267 268 273 public PropertyClass getConfig(); 274 275 281 public URL [] getContextLoaderClassPath(); 282 283 288 public ClassLoader getContextLoader(); 289 290 296 public void setResourceAlias(String uri, String location); 297 298 303 public void removeResourceAlias(String uri); 304 305 312 public BootProgressMonitor getBootProgressMonitor(); 313 314 320 public HttpServletRequest createServletRequest(RequestHandlerRequest request); 321 322 329 public HttpServletResponse createServletResponse(RequestHandlerResponse response, HttpServletRequest request); 330 } | Popular Tags |