1 2 3 27 28 29 package org.apache.catalina.connector; 30 31 32 import java.security.Principal ; 33 import java.util.Locale ; 34 import java.util.Enumeration ; 35 import javax.servlet.RequestDispatcher ; 36 import javax.servlet.ServletContext ; 37 import javax.servlet.ServletException ; 38 import javax.servlet.ServletInputStream ; 39 import javax.servlet.ServletRequest ; 40 import javax.servlet.http.HttpServletRequest ; 41 import javax.servlet.http.Cookie ; 42 import javax.servlet.http.HttpSession ; 43 import org.apache.catalina.HttpRequest; 44 import org.apache.catalina.session.StandardSessionFacade; 45 46 47 54 55 public final class HttpRequestFacade 56 extends RequestFacade 57 implements HttpServletRequest { 58 59 60 62 63 68 public HttpRequestFacade(HttpRequest request) { 69 super(request); 70 } 71 72 73 75 76 public String getAuthType() { 77 return ((HttpServletRequest ) request).getAuthType(); 78 } 79 80 81 public Cookie [] getCookies() { 82 return ((HttpServletRequest ) request).getCookies(); 83 } 84 85 86 public long getDateHeader(String name) { 87 return ((HttpServletRequest ) request).getDateHeader(name); 88 } 89 90 91 public String getHeader(String name) { 92 return ((HttpServletRequest ) request).getHeader(name); 93 } 94 95 96 public Enumeration getHeaders(String name) { 97 return ((HttpServletRequest ) request).getHeaders(name); 98 } 99 100 101 public Enumeration getHeaderNames() { 102 return ((HttpServletRequest ) request).getHeaderNames(); 103 } 104 105 106 public int getIntHeader(String name) { 107 return ((HttpServletRequest ) request).getIntHeader(name); 108 } 109 110 111 public String getMethod() { 112 return ((HttpServletRequest ) request).getMethod(); 113 } 114 115 116 public String getPathInfo() { 117 return ((HttpServletRequest ) request).getPathInfo(); 118 } 119 120 121 public String getPathTranslated() { 122 return ((HttpServletRequest ) request).getPathTranslated(); 123 } 124 125 126 public String getContextPath() { 127 return ((HttpServletRequest ) request).getContextPath(); 128 } 129 130 131 public String getQueryString() { 132 return ((HttpServletRequest ) request).getQueryString(); 133 } 134 135 136 public String getRemoteUser() { 137 return ((HttpServletRequest ) request).getRemoteUser(); 138 } 139 140 141 public boolean isUserInRole(String role) { 142 return ((HttpServletRequest ) request).isUserInRole(role); 143 } 144 145 146 public java.security.Principal getUserPrincipal() { 147 return ((HttpServletRequest ) request).getUserPrincipal(); 148 } 149 150 151 public String getRequestedSessionId() { 152 return ((HttpServletRequest ) request).getRequestedSessionId(); 153 } 154 155 156 public String getRequestURI() { 157 return ((HttpServletRequest ) request).getRequestURI(); 158 } 159 160 161 public StringBuffer getRequestURL() { 162 return ((HttpServletRequest ) request).getRequestURL(); 163 } 164 165 166 public String getServletPath() { 167 return ((HttpServletRequest ) request).getServletPath(); 168 } 169 170 171 public HttpSession getSession(boolean create) { 172 HttpSession session = 173 ((HttpServletRequest ) request).getSession(create); 174 if (session == null) 175 return null; 176 else 177 return new StandardSessionFacade(session); 178 } 179 180 181 public HttpSession getSession() { 182 return getSession(true); 183 } 184 185 186 public boolean isRequestedSessionIdValid() { 187 return ((HttpServletRequest ) request).isRequestedSessionIdValid(); 188 } 189 190 191 public boolean isRequestedSessionIdFromCookie() { 192 return ((HttpServletRequest ) request).isRequestedSessionIdFromCookie(); 193 } 194 195 196 public boolean isRequestedSessionIdFromURL() { 197 return ((HttpServletRequest ) request).isRequestedSessionIdFromURL(); 198 } 199 200 201 public boolean isRequestedSessionIdFromUrl() { 202 return ((HttpServletRequest ) request).isRequestedSessionIdFromURL(); 203 } 204 205 206 } 207 | Popular Tags |