Package org.gwizard.test.web
Class FakeHttpServletRequest
java.lang.Object
jakarta.servlet.ServletRequestWrapper
jakarta.servlet.http.HttpServletRequestWrapper
org.gwizard.test.web.FakeHttpServletRequest
- All Implemented Interfaces:
jakarta.servlet.http.HttpServletRequest,jakarta.servlet.ServletRequest
public class FakeHttpServletRequest
extends jakarta.servlet.http.HttpServletRequestWrapper
HttpServletRequest which implements only the attribute-related methods (and not even
all of those). Suitable as a scope for framework bits that need such a thing.
All methods except attribute-related methods will either do nothing or return null.
-
Field Summary
Fields inherited from interface jakarta.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String key) voidremoveAttribute(String key) voidsetAttribute(String key, Object value) Methods inherited from class jakarta.servlet.http.HttpServletRequestWrapper
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgradeMethods inherited from class jakarta.servlet.ServletRequestWrapper
getAsyncContext, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterNames, getParameterValues, getProtocol, getProtocolRequestId, getReader, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, setCharacterEncoding, setRequest, startAsync, startAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.ServletRequest
getAsyncContext, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterNames, getParameterValues, getProtocol, getProtocolRequestId, getReader, getRemoteHost, getRemotePort, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, setCharacterEncoding, startAsync, startAsync
-
Constructor Details
-
FakeHttpServletRequest
public FakeHttpServletRequest()
-
-
Method Details
-
getAttribute
- Specified by:
getAttributein interfacejakarta.servlet.ServletRequest- Overrides:
getAttributein classjakarta.servlet.ServletRequestWrapper
-
setAttribute
- Specified by:
setAttributein interfacejakarta.servlet.ServletRequest- Overrides:
setAttributein classjakarta.servlet.ServletRequestWrapper
-
removeAttribute
- Specified by:
removeAttributein interfacejakarta.servlet.ServletRequest- Overrides:
removeAttributein classjakarta.servlet.ServletRequestWrapper
-
getRemoteAddr
- Specified by:
getRemoteAddrin interfacejakarta.servlet.ServletRequest- Overrides:
getRemoteAddrin classjakarta.servlet.ServletRequestWrapper
-
getHeaderNames
- Specified by:
getHeaderNamesin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getHeaderNamesin classjakarta.servlet.http.HttpServletRequestWrapper
-
getParameterMap
- Specified by:
getParameterMapin interfacejakarta.servlet.ServletRequest- Overrides:
getParameterMapin classjakarta.servlet.ServletRequestWrapper
-