Package com.avoka.tm.test
Class MockRequest
java.lang.Object
com.avoka.tm.test.MockRequest
- All Implemented Interfaces:
- jakarta.servlet.http.HttpServletRequest,- jakarta.servlet.ServletRequest
Mock implementation of HttpServletRequest.
Implements all of the methods from the standard HttpServletRequest class plus helper methods to aid setting up a request.
This class was adapted from Apache Click.
- Since:
- 5.0
- See Also:
- 
- HttpServletRequest
 
- 
Field SummaryFieldsFields inherited from interface jakarta.servlet.http.HttpServletRequestBASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
- 
Constructor SummaryConstructorsConstructorDescriptionCreate new MockRequest.MockRequest(jakarta.servlet.ServletContext servletContext) Create a new MockRequest for the specified context.MockRequest(Locale locale) Create new MockRequest for the specified local.MockRequest(Locale locale, jakarta.servlet.ServletContext servletContext) Create a new MockRequest for the specified locale and servletContext.MockRequest(Locale locale, jakarta.servlet.ServletContext servletContext, jakarta.servlet.http.HttpSession session) Create a new MockRequest for the specified arguments.MockRequest(Locale locale, String contextPath, String servletPath, jakarta.servlet.ServletContext servletContext, jakarta.servlet.http.HttpSession session) Create a new MockRequest for the specified arguments.
- 
Method SummaryModifier and TypeMethodDescriptionaddCookie(jakarta.servlet.http.Cookie cookie) Add a new cookie.Add a header to the request.booleanauthenticate(jakarta.servlet.http.HttpServletResponse response) jakarta.servlet.AsyncContextgetAttribute(String name) Get an attribute.Get the names of all of the values.Get the auth type.Get the current character encoding.intReturn the length of the content.longIf useMultiPartContentType set as true return the correct content-type.Returns the portion of the request URI that indicates the context of the request.jakarta.servlet.http.Cookie[]Get all of the cookies for this request.longgetDateHeader(String name) Get the given header as a date.jakarta.servlet.DispatcherTypeReturns the url that was forwarded to, otherwise return null.Get the given header value.Get the names of all of the headers.Return the map of headers for this request.getHeaders(String name) Get enumeration of all header values with the given name.Returns the list of server side included url's.jakarta.servlet.ServletInputStreamReturns an input stream if there has been added some uploaded files.intgetIntHeader(String name) Get the given header as an int.Return the local address, "127.0.0.1".Get the locale of the request.Return all the accepted locales.Return the local name, "127.0.0.1".intReturn the local port, 80.Get the method.getParameter(String name) Get the request parameter with the given name.Get the map of all of the parameters.Get the names of all of the parameters.String[]getParameterValues(String name) Get the values for the given parameter.jakarta.servlet.http.PartCollection<jakarta.servlet.http.Part>getParts()Get the path info.Always returns null.Get the protocol.Get the query string part of the request.This feature is not implemented at this time as we are not supporting binary servlet input.getRealPath(String name) Deprecated.Use ServletContext.getRealPath(String) instead.Get the remote address of the client.Get the remote host.intReturn the remote port, 80.Return the name of theuserPrincipalif set, otherwise the value of the "REMOTE_USER" header.jakarta.servlet.RequestDispatchergetRequestDispatcher(String path) Returns a RequestDispatcher for the specified path.Get the requested session id.Returns context path and servlet path concatenated, typically /applicationClassName/applicationClassName.Returns (an attempt at) a reconstructed URL based on it's constituent parts.Get the scheme http, https, or ftp.Get the host server name to which the request was sent.intReturns the port number to which the request was sent.jakarta.servlet.ServletConnectionjakarta.servlet.ServletContextReturn the servlet context.Return a String containing the name or path of the servlet being called.jakarta.servlet.http.HttpSessionReturns the current HttpSession associated with this request.jakarta.servlet.http.HttpSessiongetSession(boolean create) Returns the current HttpSession associated with this request.Get the user principal.final voidReset the request back to a default state.booleanbooleanbooleanisPost()Return whether the request is a post or not.booleanCheck whether session id is from a cookie.booleanCheck whether session id is from a url rewrite.booleanCheck whether session id is from a url rewrite.booleanCheck whether the session id is valid.booleanisSecure()Always returns false.booleanisUserInRole(String role) Returns true if theauthenticated useris included in the given role, false otherwise.voidvoidlogout()voidremoveAttribute(String name) Remove the given attribute.removeParameter(String name) Remove the specified parameter.voidreset()Delegate to initialize method.voidsetAttribute(String name, Object o) Set the given attribute.voidsetAuthType(String authType) Set the auth type.voidsetCharacterEncoding(String encoding) Set the character encoding.setContentType(String contentType) Set the request content type.setContextPath(String contextPath) Set the portion of the request URI that indicates the context of the request.voidsetCookies(jakarta.servlet.http.Cookie[] theCookies) Set the cookies.Set request header value.Set request header values.setHttpSession(jakarta.servlet.http.HttpSession session) Set the request's session instance.Set the method.setParameter(String name, String value) Set a parameter.setParameter(String name, String[] values) Set the specified parameter name to the array of strings.setParameters(Map<String, Object> parameters) Sets a map of parameters.setPathInfo(String path) Set the path that this request is supposed to be serving.voidsetRequestURL(String requestURL) Provide a convenience method for setting the request URL.Set the request's scheme, for example http, https, or ftp.setServerName(String serverName) Sets the host server name to which the request was sent.setServerPort(int serverPort) Set the port number to which the request was sent.setServletContext(jakarta.servlet.ServletContext servletContext) Set the request's servletContext instance.setServletPath(String servletPath) Set the string containing the name or path of the servlet being called.setSession(jakarta.servlet.http.HttpSession session) Set the current HttpSession associated with this request.setUseMultiPartContentType(boolean useMultiPartContentType) True will force Request to generate multiPart ContentType and ContentLength.setUserPrincipal(Principal userPrincipal) Set the user principal.jakarta.servlet.AsyncContextjakarta.servlet.AsyncContextstartAsync(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse) toString()Returns the String representation of the mock request.jakarta.servlet.http.HttpUpgradeHandlerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.servlet.http.HttpServletRequestgetHttpServletMapping, getTrailerFields, isTrailerFieldsReady, newPushBuilder
- 
Field Details- 
REMOTE_USERThe REMOTE_USER header.- See Also:
 
 
- 
- 
Constructor Details- 
MockRequestpublic MockRequest()Create new MockRequest.
- 
MockRequestCreate new MockRequest for the specified local.- Parameters:
- locale- locale for this request
 
- 
MockRequestpublic MockRequest(jakarta.servlet.ServletContext servletContext) Create a new MockRequest for the specified context.- Parameters:
- servletContext- the servletContext for this request
 
- 
MockRequestCreate a new MockRequest for the specified locale and servletContext.- Parameters:
- locale- locale for this request
- servletContext- the servletContext for this request
 
- 
MockRequestpublic MockRequest(Locale locale, jakarta.servlet.ServletContext servletContext, jakarta.servlet.http.HttpSession session) Create a new MockRequest for the specified arguments.- Parameters:
- locale- The request locale, or null to use the default locale
- session- The session object
- servletContext- The current servlet context
 
- 
MockRequestpublic MockRequest(Locale locale, String contextPath, String servletPath, jakarta.servlet.ServletContext servletContext, jakarta.servlet.http.HttpSession session) Create a new MockRequest for the specified arguments.- Parameters:
- locale- The request locale, or null to use the default locale
- contextPath- the request context path
- servletPath- the request servlet path
- servletContext- The current servlet context
- session- the request session
 
 
- 
- 
Method Details- 
setServletContextSet the request's servletContext instance.- Parameters:
- servletContext- the new ServletContext instance
- Returns:
- the MockRequest object
 
- 
setHttpSessionSet the request's session instance.- Parameters:
- session- the new HttpSession instance
- Returns:
- the MockRequest object
 
- 
addCookieAdd a new cookie.- Parameters:
- cookie- The cookie
- Returns:
- the MockRequest object
 
- 
addHeaderAdd a header to the request.- Parameters:
- name- the name of the header to add
- value- the value
- Returns:
- the MockRequest object
 
- 
setHeaderSet request header value. The existing header value will be replaced.- Parameters:
- name- the name of the header to set
- value- the header value
- Returns:
- the MockRequest object
 
- 
setHeaderSet request header values. The existing header values will be replaced.- Parameters:
- name- the name of the header to set
- values- the header values
- Returns:
- the MockRequest object
 
- 
getAttributeGet an attribute.- Specified by:
- getAttributein interface- jakarta.servlet.ServletRequest
- Parameters:
- name- The attribute name
- Returns:
- The value, or null
 
- 
getAttributeNamesGet the names of all of the values.- Specified by:
- getAttributeNamesin interface- jakarta.servlet.ServletRequest
- Returns:
- The names
 
- 
getAuthTypeGet the auth type.- Specified by:
- getAuthTypein interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- The auth type
 
- 
getCharacterEncodingGet the current character encoding.- Specified by:
- getCharacterEncodingin interface- jakarta.servlet.ServletRequest
- Returns:
- The character encoding
 
- 
setUseMultiPartContentTypeTrue will force Request to generate multiPart ContentType and ContentLength.- Parameters:
- useMultiPartContentType- true if the request is multi-part, false otherwise
- Returns:
- the MockRequest object
 
- 
getContentLengthpublic int getContentLength()Return the length of the content. This is always -1 except if useMultiPartContentType set as true. Then the length will be the length of the generated request.- Specified by:
- getContentLengthin interface- jakarta.servlet.ServletRequest
- Returns:
- -1 if useMultiPartContentType is false. Else the length of the generated request.
 
- 
setContentTypeSet the request content type.- Parameters:
- contentType- the request content type.
- Returns:
- the MockRequest object
 
- 
getContentTypeIf useMultiPartContentType set as true return the correct content-type. If the contentType property is defined then this value will be returned.- Specified by:
- getContentTypein interface- jakarta.servlet.ServletRequest
- Returns:
- The correct multipart content-type if useMultiPartContentType is true. Else null.
 
- 
getCookiespublic jakarta.servlet.http.Cookie[] getCookies()Get all of the cookies for this request.- Specified by:
- getCookiesin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- The cookies
 
- 
getDateHeaderGet the given header as a date.- Specified by:
- getDateHeaderin interface- jakarta.servlet.http.HttpServletRequest
- Parameters:
- name- The header name
- Returns:
- The date, or -1 if header not found
 
- 
getHeaderGet the given header value.- Specified by:
- getHeaderin interface- jakarta.servlet.http.HttpServletRequest
- Parameters:
- name- The header name
- Returns:
- The header value or null
 
- 
getHeaderNamesGet the names of all of the headers.- Specified by:
- getHeaderNamesin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- The header names
 
- 
getHeadersGet enumeration of all header values with the given name.- Specified by:
- getHeadersin interface- jakarta.servlet.http.HttpServletRequest
- Parameters:
- name- The name
- Returns:
- The header values
 
- 
getHeadersReturn the map of headers for this request.- Returns:
- the map of headers for this request
 
- 
getInputStreamReturns an input stream if there has been added some uploaded files.- Specified by:
- getInputStreamin interface- jakarta.servlet.ServletRequest
- Returns:
- The input stream
- Throws:
- IOException- If an I/O related problem occurs
 
- 
getIntHeaderGet the given header as an int.- Specified by:
- getIntHeaderin interface- jakarta.servlet.http.HttpServletRequest
- Parameters:
- name- The header name
- Returns:
- The header value or -1 if header not found
 
- 
getLocaleGet the locale of the request. Attempts to decode the Accept-Language header and if not found returns the default locale of the JVM.- Specified by:
- getLocalein interface- jakarta.servlet.ServletRequest
- Returns:
- The locale
 
- 
getLocalesReturn all the accepted locales. This implementation always returns just one.- Specified by:
- getLocalesin interface- jakarta.servlet.ServletRequest
- Returns:
- The locales
 
- 
getMethodGet the method. The returned string will be in upper case eg. POST.- Specified by:
- getMethodin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- The method
 
- 
getParameterGet the request parameter with the given name.- Specified by:
- getParameterin interface- jakarta.servlet.ServletRequest
- Parameters:
- name- The parameter name
- Returns:
- The parameter value, or null
 
- 
getParameterMapGet the map of all of the parameters.- Specified by:
- getParameterMapin interface- jakarta.servlet.ServletRequest
- Returns:
- The parameters
 
- 
getParameterNamesGet the names of all of the parameters.- Specified by:
- getParameterNamesin interface- jakarta.servlet.ServletRequest
- Returns:
- The parameter names
 
- 
getParameterValuesGet the values for the given parameter.- Specified by:
- getParameterValuesin interface- jakarta.servlet.ServletRequest
- Parameters:
- name- The name of the parameter
- Returns:
- The return values
 
- 
getPathInfoGet the path info.- Specified by:
- getPathInfoin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- The path info
 
- 
getPathTranslatedAlways returns null.- Specified by:
- getPathTranslatedin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- null
 
- 
getProtocolGet the protocol.- Specified by:
- getProtocolin interface- jakarta.servlet.ServletRequest
- Returns:
- Always HTTP/1.1
 
- 
getQueryStringGet the query string part of the request.- Specified by:
- getQueryStringin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- The query string
 
- 
getReaderThis feature is not implemented at this time as we are not supporting binary servlet input. This functionality may be added in the future.- Specified by:
- getReaderin interface- jakarta.servlet.ServletRequest
- Returns:
- The reader
- Throws:
- IOException- If an I/O related problem occurs
 
- 
getRealPathDeprecated.Use ServletContext.getRealPath(String) instead.Deprecated method - should not be used.- Parameters:
- name- The name
- Returns:
- The path
 
- 
getRemoteAddrGet the remote address of the client.- Specified by:
- getRemoteAddrin interface- jakarta.servlet.ServletRequest
- Returns:
- Always 127.0.0.1
 
- 
getRemoteHostGet the remote host.- Specified by:
- getRemoteHostin interface- jakarta.servlet.ServletRequest
- Returns:
- Always localhost
 
- 
getRemoteUserReturn the name of the userPrincipalif set, otherwise the value of the "REMOTE_USER" header.To set the remote user, create an instance of a MockPrincipaland set it on the request through the methodsetUserPrincipal(java.security.Principal).- Specified by:
- getRemoteUserin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- the name of the remote user
 
- 
getLocalAddrReturn the local address, "127.0.0.1".- Specified by:
- getLocalAddrin interface- jakarta.servlet.ServletRequest
- Returns:
- "127.0.0.1" as the local address
 
- 
getLocalNameReturn the local name, "127.0.0.1".- Specified by:
- getLocalNamein interface- jakarta.servlet.ServletRequest
- Returns:
- "127.0.0.1" as the local name
 
- 
getLocalPortpublic int getLocalPort()Return the local port, 80.- Specified by:
- getLocalPortin interface- jakarta.servlet.ServletRequest
- Returns:
- 80 as the local port
 
- 
getRemotePortpublic int getRemotePort()Return the remote port, 80.- Specified by:
- getRemotePortin interface- jakarta.servlet.ServletRequest
- Returns:
- 80 as the remote port
 
- 
getRequestDispatcherReturns a RequestDispatcher for the specified path. The dispatcher will not dispatch to the resource. It only records the specified path so that one can test if the correct path was dispatched to.- Specified by:
- getRequestDispatcherin interface- jakarta.servlet.ServletRequest
- Parameters:
- path- a String specifying the pathname to the resource
- Returns:
- a dispatcher for the specified path
 
- 
getRequestedSessionIdGet the requested session id. Always returns the id of the current session.- Specified by:
- getRequestedSessionIdin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- The session id
 
- 
getRequestURIReturns context path and servlet path concatenated, typically /applicationClassName/applicationClassName.- Specified by:
- getRequestURIin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- The path value
- See Also:
- 
- HttpServletRequest.getRequestURI()
 
 
- 
setRequestURLProvide a convenience method for setting the request URL.- Parameters:
- requestURL- the request URL to set
 
- 
getRequestURLReturns (an attempt at) a reconstructed URL based on it's constituent parts. If the requestURL property is set this value will be returned instead.- Specified by:
- getRequestURLin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- a StringBuffer object containing the reconstructed URL
- See Also:
- 
- HttpServletRequest.getRequestURL()
 
 
- 
isPostpublic boolean isPost()Return whether the request is a post or not.- Returns:
- true if the request is a post, false otherwise
 
- 
getSchemeGet the scheme http, https, or ftp.- Specified by:
- getSchemein interface- jakarta.servlet.ServletRequest
- Returns:
- the scheme used by this request
 
- 
setSchemeSet the request's scheme, for example http, https, or ftp.- Parameters:
- scheme- the request's scheme
- Returns:
- the MockRequest object
 
- 
getServerNameGet the host server name to which the request was sent.- Specified by:
- getServerNamein interface- jakarta.servlet.ServletRequest
- Returns:
- always the host server name
 
- 
setServerNameSets the host server name to which the request was sent.- Parameters:
- serverName- the server name the request was sent to
- Returns:
- the MockRequest object
 
- 
getServerPortpublic int getServerPort()Returns the port number to which the request was sent.- Specified by:
- getServerPortin interface- jakarta.servlet.ServletRequest
- Returns:
- the server port to which the request was sent
 
- 
setServerPortSet the port number to which the request was sent.- Parameters:
- serverPort- the port number to which the request was sent
- Returns:
- the MockRequest object
 
- 
getContextPathReturns the portion of the request URI that indicates the context of the request.- Specified by:
- getContextPathin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- the portion of the request URI that indicates the context of the request.
 
- 
setContextPathSet the portion of the request URI that indicates the context of the request.- Parameters:
- contextPath- the portion of the request URI that indicates the context of the request.
- Returns:
- the MockRequest object
 
- 
getServletContextpublic jakarta.servlet.ServletContext getServletContext()Return the servlet context.- Specified by:
- getServletContextin interface- jakarta.servlet.ServletRequest
- Returns:
- the servlet context.
- Since:
- Servlet 3.0
 
- 
getServletPathReturn a String containing the name or path of the servlet being called.- Specified by:
- getServletPathin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- The servlet path
 
- 
setServletPathSet the string containing the name or path of the servlet being called.- Parameters:
- servletPath- a String containing the name or path of the servlet being called
- Returns:
- the MockRequest object
 
- 
getSessionpublic jakarta.servlet.http.HttpSession getSession()Returns the current HttpSession associated with this request.- Specified by:
- getSessionin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- the session associated with this request
 
- 
setSessionSet the current HttpSession associated with this request.- Parameters:
- session- the HttpSession to associate with this request
- Returns:
- the MockRequest object
 
- 
getSessionpublic jakarta.servlet.http.HttpSession getSession(boolean create) Returns the current HttpSession associated with this request.- Specified by:
- getSessionin interface- jakarta.servlet.http.HttpServletRequest
- Parameters:
- create- if true creates a new session if one does not exist
- Returns:
- the current HttpSession associated with this request.
 
- 
getUserPrincipalGet the user principal. If no user principal was set this method will create a user principal for thegetRemoteUser().- Specified by:
- getUserPrincipalin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- the user principal
 
- 
setUserPrincipalSet the user principal.- Parameters:
- userPrincipal- the user principal
- Returns:
- the MockRequest object
 
- 
initializepublic final void initialize()Reset the request back to a default state.
- 
resetpublic void reset()Delegate to initialize method.
- 
isRequestedSessionIdFromCookiepublic boolean isRequestedSessionIdFromCookie()Check whether session id is from a cookie. Always returns true.- Specified by:
- isRequestedSessionIdFromCookiein interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- Always true
 
- 
isRequestedSessionIdFromUrlpublic boolean isRequestedSessionIdFromUrl()Check whether session id is from a url rewrite. Always returns false.- Returns:
- Always false
 
- 
isRequestedSessionIdFromURLpublic boolean isRequestedSessionIdFromURL()Check whether session id is from a url rewrite. Always returns false.- Specified by:
- isRequestedSessionIdFromURLin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- Always false
 
- 
isRequestedSessionIdValidpublic boolean isRequestedSessionIdValid()Check whether the session id is valid.- Specified by:
- isRequestedSessionIdValidin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- Always true
 
- 
isSecurepublic boolean isSecure()Always returns false.- Specified by:
- isSecurein interface- jakarta.servlet.ServletRequest
- Returns:
- Always false
 
- 
isUserInRoleReturns true if the authenticated useris included in the given role, false otherwise.To mock up roles for a user, create a user principaland set the necessary roles. SeeMockPrincipalfor an example.- Specified by:
- isUserInRolein interface- jakarta.servlet.http.HttpServletRequest
- Parameters:
- role- the role name
- Returns:
- true if the user is included in the specified role, false otherwise
 
- 
removeAttributeRemove the given attribute.- Specified by:
- removeAttributein interface- jakarta.servlet.ServletRequest
- Parameters:
- name- The name of the attribute
 
- 
setAttributeSet the given attribute.- Specified by:
- setAttributein interface- jakarta.servlet.ServletRequest
- Parameters:
- name- The attribute name
- o- The value to set
 
- 
setAuthTypeSet the auth type.- Parameters:
- authType- The auth type
 
- 
setCharacterEncodingSet the character encoding.- Specified by:
- setCharacterEncodingin interface- jakarta.servlet.ServletRequest
- Parameters:
- encoding- The character encoding
- Throws:
- UnsupportedEncodingException- If encoding not supported
 
- 
setCookiespublic void setCookies(jakarta.servlet.http.Cookie[] theCookies) Set the cookies.- Parameters:
- theCookies- The cookies
 
- 
setMethodSet the method.- Parameters:
- method- The method
- Returns:
- the MockRequest object
 
- 
setParameterSet a parameter.- Parameters:
- name- The name
- value- The value
- Returns:
- the MockRequest object
 
- 
setParameterSet the specified parameter name to the array of strings.- Parameters:
- name- name of the parameter
- values- the parameter values
- Returns:
- the MockRequest object
 
- 
removeParameterRemove the specified parameter.- Parameters:
- name- the parameter name to remove
- Returns:
- the MockRequest object
 
- 
setParametersSets a map of parameters.- Parameters:
- parameters- the parameters to set
- Returns:
- the MockRequest object
 
- 
setPathInfoSet the path that this request is supposed to be serving. The path is relative to the web application root and should start with a / character- Parameters:
- path- specifies the request path to serve
- Returns:
- the MockRequest object
 
- 
getForwardReturns the url that was forwarded to, otherwise return null. jakarta.servlet.ServletResponse)- Returns:
- url that was forwarded to
 
- 
getIncludesReturns the list of server side included url's. jakarta.servlet.ServletResponse)- Returns:
- list of urls that were included
 
- 
toStringReturns the String representation of the mock request.
- 
getAsyncContextpublic jakarta.servlet.AsyncContext getAsyncContext()- Specified by:
- getAsyncContextin interface- jakarta.servlet.ServletRequest
- Returns:
- null
- See Also:
- 
- ServletRequest.getAsyncContext()
 
 
- 
getContentLengthLongpublic long getContentLengthLong()- Specified by:
- getContentLengthLongin interface- jakarta.servlet.ServletRequest
- Returns:
- 0
- See Also:
- 
- ServletRequest.getContentLengthLong()
 
 
- 
getDispatcherTypepublic jakarta.servlet.DispatcherType getDispatcherType()- Specified by:
- getDispatcherTypein interface- jakarta.servlet.ServletRequest
- Returns:
- null
- See Also:
- 
- ServletRequest.getDispatcherType()
 
 
- 
getRequestId- Specified by:
- getRequestIdin interface- jakarta.servlet.ServletRequest
 
- 
getProtocolRequestId- Specified by:
- getProtocolRequestIdin interface- jakarta.servlet.ServletRequest
 
- 
getServletConnectionpublic jakarta.servlet.ServletConnection getServletConnection()- Specified by:
- getServletConnectionin interface- jakarta.servlet.ServletRequest
 
- 
isAsyncStartedpublic boolean isAsyncStarted()- Specified by:
- isAsyncStartedin interface- jakarta.servlet.ServletRequest
- Returns:
- false
- See Also:
- 
- ServletRequest.isAsyncStarted()
 
 
- 
isAsyncSupportedpublic boolean isAsyncSupported()- Specified by:
- isAsyncSupportedin interface- jakarta.servlet.ServletRequest
- Returns:
- false
- See Also:
- 
- ServletRequest.isAsyncSupported()
 
 
- 
startAsyncpublic jakarta.servlet.AsyncContext startAsync()- Specified by:
- startAsyncin interface- jakarta.servlet.ServletRequest
- Returns:
- the (re)initialized AsyncContext
- See Also:
- 
- ServletRequest.startAsync()
 
 
- 
startAsyncpublic jakarta.servlet.AsyncContext startAsync(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse) - Specified by:
- startAsyncin interface- jakarta.servlet.ServletRequest
- Parameters:
- servletRequest- the ServletRequest used to initialize the AsyncContext
- servletResponse- the ServletResponse used to initialize the AsyncContext
- Returns:
- null
- See Also:
- 
- ServletRequest.startAsync(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse)
 
 
- 
authenticate- Specified by:
- authenticatein interface- jakarta.servlet.http.HttpServletRequest
- Parameters:
- response- The- HttpServletResponseassociated with this- HttpServletRequest
- Returns:
- false
- Throws:
- IOException- never thrown
 
- 
changeSessionId- Specified by:
- changeSessionIdin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- null
 
- 
getPart- Specified by:
- getPartin interface- jakarta.servlet.http.HttpServletRequest
- Parameters:
- name- the part name
- Returns:
- null
- Throws:
- IOException- never thrown
 
- 
getParts- Specified by:
- getPartsin interface- jakarta.servlet.http.HttpServletRequest
- Returns:
- null
- Throws:
- IOException- never thrown
- See Also:
- 
- HttpServletRequest.getParts()
 
 
- 
login- Specified by:
- loginin interface- jakarta.servlet.http.HttpServletRequest
- Parameters:
- username- The- Stringvalue corresponding to the login identifier of the user.
- password- The password- Stringcorresponding to the identified user.
- See Also:
- 
- HttpServletRequest.login(java.lang.String, java.lang.String)
 
 
- 
logoutpublic void logout()- Specified by:
- logoutin interface- jakarta.servlet.http.HttpServletRequest
- See Also:
- 
- HttpServletRequest.logout()
 
 
- 
upgrade- Specified by:
- upgradein interface- jakarta.servlet.http.HttpServletRequest
- Parameters:
- handlerClass- The- HttpUpgradeHandlerclass used for the upgrade.
- Returns:
- null
- Throws:
- IOException- never thrown
- See Also:
- 
- HttpServletRequest.upgrade(java.lang.Class)
 
 
 
-