Package com.helger.servlet.mock
Class OfflineHttpServletRequest
- java.lang.Object
-
- com.helger.servlet.mock.MockHttpServletRequest
-
- com.helger.servlet.mock.OfflineHttpServletRequest
-
- All Implemented Interfaces:
com.helger.commons.locale.IHasLocale,jakarta.servlet.http.HttpServletRequest,jakarta.servlet.ServletRequest
@NotThreadSafe @IsOffline public class OfflineHttpServletRequest extends MockHttpServletRequest
A specialMockHttpServletRequestthat throwsUnsupportedOperationExceptionexceptions for server or path related queries. So it is "offline" only :)- Author:
- Philip Helger
-
-
Field Summary
-
Fields inherited from class com.helger.servlet.mock.MockHttpServletRequest
DEFAULT_INVOKE_HTTP_LISTENER, DEFAULT_METHOD, DEFAULT_PROTOCOL, DEFAULT_REMOTE_ADDR, DEFAULT_REMOTE_HOST, DEFAULT_SCHEME, DEFAULT_SERVER_ADDR, DEFAULT_SERVER_NAME, DEFAULT_SERVER_PORT
-
-
Constructor Summary
Constructors Constructor Description OfflineHttpServletRequest()OfflineHttpServletRequest(jakarta.servlet.ServletContext aSC, boolean bInvokeHttpListeners)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthType()intgetContentLength()StringgetContentType()StringgetMethod()StringgetPathInfo()StringgetPathTranslated()StringgetProtocol()StringgetQueryString()StringgetRemoteAddr()StringgetRemoteHost()intgetRemotePort()StringgetRemoteUser()StringgetScheme()StringgetServerName()intgetServerPort()StringgetServletPath()-
Methods inherited from class com.helger.servlet.mock.MockHttpServletRequest
addHeader, addParameter, addParameter, addParameters, addPreferredLocale, addUserRole, authenticate, changeSessionId, checkActive, clearAttributes, close, getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getCharacterEncodingObj, getCharacterEncodingObjOrDefault, getContentLengthLong, getContextPath, getCookies, getDateHeader, getDispatcherType, getHeader, getHeaderNames, getHeaders, getInputStream, getIntHeader, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getMethodEnum, getParameter, getParameterMap, getParameterNames, getParameterValues, getPart, getParts, getReader, getRealPath, getRequestDispatcher, getRequestedSessionId, getRequestURI, getRequestURL, getServletContext, getSession, getSession, getSessionID, getUserPrincipal, invalidate, isActive, isAsyncStarted, isAsyncSupported, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isSecure, isUserInRole, login, logout, removeAllParameters, removeAttribute, removeHeader, removeParameter, setAllPaths, setAttribute, setAuthType, setCharacterEncoding, setCharacterEncoding, setContent, setContentType, setContentType, setContextPath, setCookies, setLocalAddr, setLocalName, setLocalPort, setMethod, setParameter, setParameter, setParameters, setPathInfo, setProtocol, setQueryString, setRemoteAddr, setRemoteHost, setRemotePort, setRemoteUser, setRequestedSessionIdFromCookie, setRequestedSessionIdFromURL, setRequestedSessionIdValid, setRequestURI, setScheme, setSecure, setServerName, setServerPort, setServletPath, setSession, setSessionID, setUserPrincipal, startAsync, startAsync, upgrade
-
-
-
-
Constructor Detail
-
OfflineHttpServletRequest
public OfflineHttpServletRequest()
-
OfflineHttpServletRequest
public OfflineHttpServletRequest(@Nullable jakarta.servlet.ServletContext aSC, boolean bInvokeHttpListeners)
-
-
Method Detail
-
getScheme
public String getScheme()
- Specified by:
getSchemein interfacejakarta.servlet.ServletRequest- Overrides:
getSchemein classMockHttpServletRequest
-
getServerName
public String getServerName()
- Specified by:
getServerNamein interfacejakarta.servlet.ServletRequest- Overrides:
getServerNamein classMockHttpServletRequest
-
getProtocol
public String getProtocol()
- Specified by:
getProtocolin interfacejakarta.servlet.ServletRequest- Overrides:
getProtocolin classMockHttpServletRequest
-
getServerPort
public int getServerPort()
- Specified by:
getServerPortin interfacejakarta.servlet.ServletRequest- Overrides:
getServerPortin classMockHttpServletRequest
-
getMethod
public String getMethod()
- Specified by:
getMethodin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getMethodin classMockHttpServletRequest
-
getPathInfo
public String getPathInfo()
- Specified by:
getPathInfoin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getPathInfoin classMockHttpServletRequest
-
getPathTranslated
public String getPathTranslated()
- Specified by:
getPathTranslatedin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getPathTranslatedin classMockHttpServletRequest
-
getQueryString
public String getQueryString()
- Specified by:
getQueryStringin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getQueryStringin classMockHttpServletRequest
-
getRemoteHost
public String getRemoteHost()
- Specified by:
getRemoteHostin interfacejakarta.servlet.ServletRequest- Overrides:
getRemoteHostin classMockHttpServletRequest
-
getRemoteAddr
public String getRemoteAddr()
- Specified by:
getRemoteAddrin interfacejakarta.servlet.ServletRequest- Overrides:
getRemoteAddrin classMockHttpServletRequest
-
getAuthType
public String getAuthType()
- Specified by:
getAuthTypein interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getAuthTypein classMockHttpServletRequest
-
getRemotePort
public int getRemotePort()
- Specified by:
getRemotePortin interfacejakarta.servlet.ServletRequest- Overrides:
getRemotePortin classMockHttpServletRequest
-
getRemoteUser
public String getRemoteUser()
- Specified by:
getRemoteUserin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getRemoteUserin classMockHttpServletRequest
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfacejakarta.servlet.ServletRequest- Overrides:
getContentTypein classMockHttpServletRequest
-
getContentLength
public int getContentLength()
- Specified by:
getContentLengthin interfacejakarta.servlet.ServletRequest- Overrides:
getContentLengthin classMockHttpServletRequest
-
getServletPath
public String getServletPath()
- Specified by:
getServletPathin interfacejakarta.servlet.http.HttpServletRequest- Overrides:
getServletPathin classMockHttpServletRequest
-
-