Class JavaxMockHttpServletRequest
java.lang.Object
org.apache.commons.fileupload2.javax.JavaxMockHttpServletRequest
- All Implemented Interfaces:
javax.servlet.http.HttpServletRequest
,javax.servlet.ServletRequest
public class JavaxMockHttpServletRequest
extends Object
implements javax.servlet.http.HttpServletRequest
Test fixture for
HttpServletRequest
.-
Field Summary
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
Constructor Summary
ConstructorDescriptionJavaxMockHttpServletRequest
(byte[] requestData, String contentType) Creates a new instance with the given request data and content type.JavaxMockHttpServletRequest
(InputStream requestInputStream, long requestLength, String contentType, int readLimit) Creates a new instance with the given request data and content type. -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String arg0) int
javax.servlet.http.Cookie[]
long
getDateHeader
(String arg0) getHeaders
(String arg0) javax.servlet.ServletInputStream
int
getIntHeader
(String arg0) int
getParameter
(String arg0) String[]
getParameterValues
(String arg0) getRealPath
(String arg0) Deprecated.int
javax.servlet.RequestDispatcher
getRequestDispatcher
(String arg0) int
javax.servlet.http.HttpSession
javax.servlet.http.HttpSession
getSession
(boolean arg0) boolean
boolean
Deprecated.boolean
boolean
boolean
isSecure()
boolean
isUserInRole
(String arg0) void
removeAttribute
(String arg0) void
setAttribute
(String arg0, Object arg1) void
setCharacterEncoding
(String arg0)
-
Constructor Details
-
JavaxMockHttpServletRequest
Creates a new instance with the given request data and content type. -
JavaxMockHttpServletRequest
public JavaxMockHttpServletRequest(InputStream requestInputStream, long requestLength, String contentType, int readLimit) Creates a new instance with the given request data and content type.
-
-
Method Details
-
getAttribute
- Specified by:
getAttribute
in interfacejavax.servlet.ServletRequest
- See Also:
-
getAttributeNames
- Specified by:
getAttributeNames
in interfacejavax.servlet.ServletRequest
- See Also:
-
getAuthType
- Specified by:
getAuthType
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getCharacterEncoding
- Specified by:
getCharacterEncoding
in interfacejavax.servlet.ServletRequest
- See Also:
-
getContentLength
- Specified by:
getContentLength
in interfacejavax.servlet.ServletRequest
- See Also:
-
getContentType
- Specified by:
getContentType
in interfacejavax.servlet.ServletRequest
- See Also:
-
getContextPath
- Specified by:
getContextPath
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getCookies
- Specified by:
getCookies
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getDateHeader
- Specified by:
getDateHeader
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getHeader
- Specified by:
getHeader
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getHeaderNames
- Specified by:
getHeaderNames
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getHeaders
- Specified by:
getHeaders
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getInputStream
- Specified by:
getInputStream
in interfacejavax.servlet.ServletRequest
- Throws:
IOException
- See Also:
-
getIntHeader
- Specified by:
getIntHeader
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getLocalAddr
- Specified by:
getLocalAddr
in interfacejavax.servlet.ServletRequest
- See Also:
-
getLocale
- Specified by:
getLocale
in interfacejavax.servlet.ServletRequest
- See Also:
-
getLocales
- Specified by:
getLocales
in interfacejavax.servlet.ServletRequest
- See Also:
-
getLocalName
- Specified by:
getLocalName
in interfacejavax.servlet.ServletRequest
- See Also:
-
getLocalPort
- Specified by:
getLocalPort
in interfacejavax.servlet.ServletRequest
- See Also:
-
getMethod
- Specified by:
getMethod
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getParameter
- Specified by:
getParameter
in interfacejavax.servlet.ServletRequest
- See Also:
-
getParameterMap
- Specified by:
getParameterMap
in interfacejavax.servlet.ServletRequest
- See Also:
-
getParameterNames
- Specified by:
getParameterNames
in interfacejavax.servlet.ServletRequest
- See Also:
-
getParameterValues
- Specified by:
getParameterValues
in interfacejavax.servlet.ServletRequest
- See Also:
-
getPathInfo
- Specified by:
getPathInfo
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getPathTranslated
- Specified by:
getPathTranslated
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getProtocol
- Specified by:
getProtocol
in interfacejavax.servlet.ServletRequest
- See Also:
-
getQueryString
- Specified by:
getQueryString
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getReader
- Specified by:
getReader
in interfacejavax.servlet.ServletRequest
- Throws:
IOException
- See Also:
-
getRealPath
Deprecated.- Specified by:
getRealPath
in interfacejavax.servlet.ServletRequest
- See Also:
-
getRemoteAddr
- Specified by:
getRemoteAddr
in interfacejavax.servlet.ServletRequest
- See Also:
-
getRemoteHost
- Specified by:
getRemoteHost
in interfacejavax.servlet.ServletRequest
- See Also:
-
getRemotePort
- Specified by:
getRemotePort
in interfacejavax.servlet.ServletRequest
- See Also:
-
getRemoteUser
- Specified by:
getRemoteUser
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getRequestDispatcher
- Specified by:
getRequestDispatcher
in interfacejavax.servlet.ServletRequest
- See Also:
-
getRequestedSessionId
- Specified by:
getRequestedSessionId
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getRequestURI
- Specified by:
getRequestURI
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getRequestURL
- Specified by:
getRequestURL
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getScheme
- Specified by:
getScheme
in interfacejavax.servlet.ServletRequest
- See Also:
-
getServerName
- Specified by:
getServerName
in interfacejavax.servlet.ServletRequest
- See Also:
-
getServerPort
- Specified by:
getServerPort
in interfacejavax.servlet.ServletRequest
- See Also:
-
getServletPath
- Specified by:
getServletPath
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getSession
- Specified by:
getSession
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getSession
- Specified by:
getSession
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
getUserPrincipal
- Specified by:
getUserPrincipal
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
isRequestedSessionIdFromCookie
- Specified by:
isRequestedSessionIdFromCookie
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
isRequestedSessionIdFromUrl
Deprecated.- Specified by:
isRequestedSessionIdFromUrl
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
isRequestedSessionIdFromURL
- Specified by:
isRequestedSessionIdFromURL
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
isRequestedSessionIdValid
- Specified by:
isRequestedSessionIdValid
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
isSecure
- Specified by:
isSecure
in interfacejavax.servlet.ServletRequest
- See Also:
-
isUserInRole
- Specified by:
isUserInRole
in interfacejavax.servlet.http.HttpServletRequest
- See Also:
-
removeAttribute
- Specified by:
removeAttribute
in interfacejavax.servlet.ServletRequest
- See Also:
-
setAttribute
- Specified by:
setAttribute
in interfacejavax.servlet.ServletRequest
- See Also:
-
setCharacterEncoding
- Specified by:
setCharacterEncoding
in interfacejavax.servlet.ServletRequest
- Throws:
UnsupportedEncodingException
- See Also:
-