Class MockServletRequest
java.lang.Object
net.datenwerke.rs.utils.mockrequest.MockServletRequest
- Direct Known Subclasses:
SftpServletRequest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanauthenticate(HttpServletResponse arg0) AsyncContextgetAttribute(String arg0) intlongCookie[]longgetDateHeader(String arg0) DispatcherTypegetHeaders(String arg0) ServletInputStreamintgetIntHeader(String arg0) intgetParameter(String arg0) String[]getParameterValues(String arg0) PartCollection<Part> getParts()getRealPath(String arg0) intRequestDispatchergetRequestDispatcher(String arg0) intServletContextHttpSessionHttpSessiongetSession(boolean arg0) HttpSessionbooleanbooleanbooleanbooleanbooleanbooleanbooleanisSecure()booleanisUserInRole(String arg0) voidvoidlogout()voidremoveAttribute(String arg0) voidsetAttribute(String arg0, Object arg1) voidsetCharacterEncoding(String arg0) voidsetWrapperHeaders(HashMap<String, String> headers) voidsetWrapperSession(HttpSession wrapperSession) AsyncContextAsyncContextstartAsync(ServletRequest arg0, ServletResponse arg1) <T> T
-
Constructor Details
-
MockServletRequest
public MockServletRequest() -
MockServletRequest
public MockServletRequest(HttpSession session)
-
-
Method Details
-
getAttribute
-
getAttributeNames
-
getCharacterEncoding
-
getContentLength
public int getContentLength() -
getContentType
-
getInputStream
- Throws:
IOException
-
getLocalAddr
-
getLocalName
-
getLocalPort
public int getLocalPort() -
getLocale
-
getLocales
-
getParameter
-
getParameterMap
-
getParameterNames
-
getParameterValues
-
getProtocol
-
getReader
- Throws:
IOException
-
getRealPath
-
getRemoteAddr
-
getRemoteHost
-
getRemotePort
public int getRemotePort() -
getRequestDispatcher
-
getScheme
-
getServerName
-
getServerPort
public int getServerPort() -
isSecure
public boolean isSecure() -
removeAttribute
-
setAttribute
-
setCharacterEncoding
- Throws:
UnsupportedEncodingException
-
getAuthType
-
getContextPath
-
getCookies
public Cookie[] getCookies() -
getDateHeader
-
getHeader
-
getHeaderNames
-
getHeaders
-
getIntHeader
-
getMethod
-
getPathInfo
-
getPathTranslated
-
getQueryString
-
getRemoteUser
-
getRequestURI
-
getRequestURL
-
getRequestedSessionId
-
getServletPath
-
getSession
public HttpSession getSession() -
getSession
public HttpSession getSession(boolean arg0) -
getUserPrincipal
-
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie() -
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL() -
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl() -
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid() -
isUserInRole
-
getWrapperSession
public HttpSession getWrapperSession() -
setWrapperSession
public void setWrapperSession(HttpSession wrapperSession) -
setWrapperHeaders
-
getAsyncContext
public AsyncContext getAsyncContext() -
getDispatcherType
public DispatcherType getDispatcherType() -
getServletContext
public ServletContext getServletContext() -
isAsyncStarted
public boolean isAsyncStarted() -
isAsyncSupported
public boolean isAsyncSupported() -
startAsync
- Throws:
IllegalStateException
-
startAsync
public AsyncContext startAsync(ServletRequest arg0, ServletResponse arg1) throws IllegalStateException - Throws:
IllegalStateException
-
authenticate
- Throws:
IOExceptionServletException
-
getPart
- Throws:
IOExceptionServletException
-
getParts
- Throws:
IOExceptionServletException
-
login
- Throws:
ServletException
-
logout
public void logout() throws ServletException- Throws:
ServletException
-
getContentLengthLong
public long getContentLengthLong() -
changeSessionId
-
upgrade
- Throws:
IOExceptionServletException
-