1 2 24 25 26 27 28 29 package com.lutris.appserver.server.httpPresentation; 30 31 import javax.servlet.http.Cookie ; 32 import javax.servlet.http.HttpServletResponse ; 33 34 import org.enhydra.xml.io.OutputOptions; 35 import org.enhydra.xml.xmlc.XMLObject; 36 import org.w3c.dom.html.HTMLDocument; 37 38 import com.lutris.appserver.server.session.SessionManager; 39 40 47 public interface HttpPresentationResponse { 48 51 public HttpServletResponse getHttpServletResponse(); 52 53 58 public void setContentLength(int len) 59 throws HttpPresentationException; 60 61 66 public void setContentType(String type) 67 throws HttpPresentationException; 68 69 70 82 public OutputOptions createOutputOptions(XMLObject document) 83 throws HttpPresentationException; 84 85 88 public HttpPresentationOutputStream getOutputStream() 89 throws HttpPresentationException; 90 91 97 public void addCookie(Cookie cookie) 98 throws HttpPresentationException; 99 100 106 public boolean containsHeader(String name) 107 throws HttpPresentationException; 108 109 115 public void setStatus(int sc, String sm) 116 throws HttpPresentationException; 117 118 123 public void setStatus(int sc) 124 throws HttpPresentationException; 125 126 136 public void setHeader(String name, String value) 137 throws HttpPresentationException; 138 139 149 public void setIntHeader(String name, int value) 150 throws HttpPresentationException; 151 152 164 public void setDateHeader(String name, long date) 165 throws HttpPresentationException; 166 167 174 public void sendError(int sc, String msg) 175 throws HttpPresentationException; 176 177 183 public void sendError(int sc) 184 throws HttpPresentationException; 185 186 188 190 192 197 public void flush () 198 throws HttpPresentationException; 199 200 209 public void writeDOM(OutputOptions outputOptions, 210 XMLObject document) throws HttpPresentationException; 211 212 219 public void writeDOM(XMLObject document) throws HttpPresentationException; 220 221 225 public void writeHTML(String html) throws HttpPresentationException; 226 227 236 public void writeHTML(HTMLDocument doc) throws HttpPresentationException; 237 238 243 public void setEncoding(String enc); 244 245 250 public String getEncoding(); 251 252 258 public void setSessionKey(String sessionKey); 259 260 266 public void setSessionManager(SessionManager sessionManager); 267 268 273 public boolean isSessionIdCookieRequired() 274 throws HttpPresentationException; 275 276 281 public void setSessionIdCookieRequired(boolean sessionIdCookie) 282 throws HttpPresentationException; 283 284 290 public boolean isSessionIdEncodeUrlRequired() 291 throws HttpPresentationException; 292 293 298 public void setSessionIdEncodeUrlRequired(boolean sessionIdUrl) 299 throws HttpPresentationException; 300 301 304 305 308 public static final int SC_OK = 200; 309 310 314 public static final int SC_CREATED = 201; 315 316 320 public static final int SC_ACCEPTED = 202; 321 322 326 public static final int SC_NO_CONTENT = 204; 327 328 333 public static final int SC_MOVED_PERMANENTLY = 301; 334 335 340 public static final int SC_MOVED_TEMPORARILY = 302; 341 342 346 public static final int SC_NOT_MODIFIED = 304; 347 348 352 public static final int SC_BAD_REQUEST = 400; 353 354 358 public static final int SC_UNAUTHORIZED = 401; 359 360 364 public static final int SC_FORBIDDEN = 403; 365 366 370 public static final int SC_NOT_FOUND = 404; 371 372 376 public static final int SC_INTERNAL_SERVER_ERROR = 500; 377 378 382 public static final int SC_NOT_IMPLEMENTED = 501; 383 384 389 public static final int SC_BAD_GATEWAY = 502; 390 391 395 public static final int SC_SERVICE_UNAVAILABLE = 503; 396 } 397 | Popular Tags |