public class DefaultSavedRequest extends java.lang.Object implements SavedRequest
HttpServletRequest
.
This class is used by
AbstractAuthenticationProcessingFilter
and SavedRequestAwareWrapper
to
reproduce the request after successful authentication. An instance of this class is
stored at the time of an authentication exception by
ExceptionTranslationFilter
.
IMPLEMENTATION NOTE: It is assumed that this object is accessed only from the context of a single thread, so no synchronization around internal collection classes is performed.
This class is based on code in Apache Tomcat.
Modifier and Type | Class and Description |
---|---|
static class |
DefaultSavedRequest.Builder |
Modifier and Type | Field and Description |
---|---|
protected static Log |
logger |
Constructor and Description |
---|
DefaultSavedRequest(HttpServletRequest request,
PortResolver portResolver) |
Modifier and Type | Method and Description |
---|---|
boolean |
doesRequestMatch(HttpServletRequest request,
PortResolver portResolver)
Determines if the current request matches the
DefaultSavedRequest . |
java.lang.String |
getContextPath() |
java.util.List<Cookie> |
getCookies() |
java.util.Collection<java.lang.String> |
getHeaderNames() |
java.util.List<java.lang.String> |
getHeaderValues(java.lang.String name) |
java.util.List<java.util.Locale> |
getLocales() |
java.lang.String |
getMethod() |
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap() |
java.util.Collection<java.lang.String> |
getParameterNames() |
java.lang.String[] |
getParameterValues(java.lang.String name) |
java.lang.String |
getPathInfo() |
java.lang.String |
getQueryString() |
java.lang.String |
getRedirectUrl()
Indicates the URL that the user agent used for this request.
|
java.lang.String |
getRequestURI() |
java.lang.String |
getRequestURL() |
java.lang.String |
getScheme() |
java.lang.String |
getServerName() |
int |
getServerPort() |
java.lang.String |
getServletPath() |
java.lang.String |
toString() |
public DefaultSavedRequest(HttpServletRequest request, PortResolver portResolver)
public boolean doesRequestMatch(HttpServletRequest request, PortResolver portResolver)
DefaultSavedRequest
.
All URL arguments are considered but not cookies, locales, headers or parameters.
request
- the actual request to be matched against this oneportResolver
- used to obtain the server port of the requestpublic java.lang.String getContextPath()
public java.util.List<Cookie> getCookies()
getCookies
in interface SavedRequest
public java.lang.String getRedirectUrl()
getRedirectUrl
in interface SavedRequest
public java.util.Collection<java.lang.String> getHeaderNames()
getHeaderNames
in interface SavedRequest
public java.util.List<java.lang.String> getHeaderValues(java.lang.String name)
getHeaderValues
in interface SavedRequest
public java.util.List<java.util.Locale> getLocales()
getLocales
in interface SavedRequest
public java.lang.String getMethod()
getMethod
in interface SavedRequest
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
getParameterMap
in interface SavedRequest
public java.util.Collection<java.lang.String> getParameterNames()
public java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues
in interface SavedRequest
public java.lang.String getPathInfo()
public java.lang.String getQueryString()
public java.lang.String getRequestURI()
public java.lang.String getRequestURL()
public java.lang.String getScheme()
public java.lang.String getServerName()
public int getServerPort()
public java.lang.String getServletPath()
public java.lang.String toString()
toString
in class java.lang.Object