Class SavedRequest
java.lang.Object
org.apache.catalina.authenticator.SavedRequest
- All Implemented Interfaces:
Serializable
Object that saves the critical information from a request so that form-based authentication can reproduce it once the
user has been authenticated.
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a cookie to this saved request.voidAdds a header value to this saved request.voidAdds a locale to this saved request.getBody()Returns the body of the saved request.Returns the content type of the saved request.Returns an iterator over the cookies saved for this request.Returns the decoded request URI of the saved request, with path parameters excluded.Returns an iterator over the names of all headers saved for this request.getHeaderValues(String name) Returns an iterator over the values for the specified header.Returns an iterator over the locales saved for this request.Returns the HTTP method of the saved request.intDeprecated.This method will be removed in Tomcat 12.0.x onwards.Returns the original max inactive interval for the session.Returns the query string of the saved request.Returns the request URI of the saved request.voidSets the body of the saved request.voidsetContentType(String contentType) Sets the content type of the saved request.voidsetDecodedRequestURI(String decodedRequestURI) Sets the decoded request URI of the saved request.voidSets the HTTP method of the saved request.voidsetOriginalMaxInactiveInterval(int originalMaxInactiveInterval) Sets the original max inactive interval for the session.voidsetQueryString(String queryString) Sets the query string of the saved request.voidsetRequestURI(String requestURI) Sets the request URI of the saved request.
-
Constructor Details
-
SavedRequest
public SavedRequest()Default constructor.
-
-
Method Details
-
addCookie
Adds a cookie to this saved request.- Parameters:
cookie- the cookie to add
-
getCookies
-
addHeader
-
getHeaderNames
-
getHeaderValues
-
addLocale
Adds a locale to this saved request.- Parameters:
locale- the locale to add
-
getLocales
-
getMethod
Returns the HTTP method of the saved request.- Returns:
- the request method, or
nullif not set
-
setMethod
Sets the HTTP method of the saved request.- Parameters:
method- the request method
-
getQueryString
Returns the query string of the saved request.- Returns:
- the query string, or
nullif not set
-
setQueryString
Sets the query string of the saved request.- Parameters:
queryString- the query string
-
getRequestURI
Returns the request URI of the saved request.- Returns:
- the request URI, or
nullif not set
-
setRequestURI
Sets the request URI of the saved request.- Parameters:
requestURI- the request URI
-
getDecodedRequestURI
Returns the decoded request URI of the saved request, with path parameters excluded.- Returns:
- the decoded request URI, or
nullif not set
-
setDecodedRequestURI
Sets the decoded request URI of the saved request.- Parameters:
decodedRequestURI- the decoded request URI
-
getBody
-
setBody
-
getContentType
Returns the content type of the saved request.- Returns:
- the content type, or
nullif not set
-
setContentType
Sets the content type of the saved request.- Parameters:
contentType- the content type
-
getOriginalMaxInactiveIntervalOptional
Returns the original max inactive interval for the session.- Returns:
- the original max inactive interval, or
nullif not set
-
getOriginalMaxInactiveInterval
Deprecated.This method will be removed in Tomcat 12.0.x onwards. UsegetOriginalMaxInactiveIntervalOptional()Obtain the original session maxInactiveInterval.- Returns:
- the original session maxInactiveInterval
-
setOriginalMaxInactiveInterval
public void setOriginalMaxInactiveInterval(int originalMaxInactiveInterval) Sets the original max inactive interval for the session.- Parameters:
originalMaxInactiveInterval- the max inactive interval in seconds
-