1 18 package org.apache.beehive.netui.pageflow; 19 20 import javax.servlet.ServletRequest ; 21 import javax.servlet.ServletResponse ; 22 import javax.servlet.http.HttpServletRequest ; 23 import javax.servlet.http.HttpServletResponse ; 24 25 28 public class RequestContext 29 { 30 private ServletRequest _request; 31 private ServletResponse _response; 32 33 public RequestContext( ServletRequest request, ServletResponse response ) 34 { 35 _request = request; 36 _response = response; 37 } 38 39 public ServletRequest getRequest() 40 { 41 return _request; 42 } 43 44 public ServletResponse getResponse() 45 { 46 return _response; 47 } 48 49 HttpServletRequest getHttpRequest() 50 { 51 assert _request instanceof HttpServletRequest : "HttpServletRequest is currently required"; 52 return ( HttpServletRequest ) _request; 53 } 54 55 HttpServletResponse getHttpResponse() 56 { 57 assert _response instanceof HttpServletResponse : "HttpServletResponse is currently required"; 58 return ( HttpServletResponse ) _response; 59 } 60 } 61 | Popular Tags |