Package waffle.apache.catalina
Class SimpleHttpRequest
java.lang.Object
org.apache.catalina.connector.Request
waffle.apache.catalina.SimpleHttpRequest
- All Implemented Interfaces:
jakarta.servlet.http.HttpServletRequest
,jakarta.servlet.ServletRequest
public class SimpleHttpRequest
extends org.apache.catalina.connector.Request
Simple HTTP Request.
-
Field Summary
Fields inherited from class org.apache.catalina.connector.Request
asyncSupported, authType, CACHED_POST_LEN, connector, cookies, cookiesConverted, cookiesParsed, coyoteRequest, defaultLocale, facade, filterChain, inputBuffer, inputStream, internalDispatcherType, localAddr, locales, localesParsed, localName, localPort, mappingData, parameterMap, parametersParsed, parts, partsParseException, peerAddr, postData, reader, remoteAddr, remoteHost, remotePort, requestDispatcherPath, requestedSessionCookie, requestedSessionId, requestedSessionSSL, requestedSessionURL, response, secure, session, sm, sslAttributesParsed, subject, URIConverter, userPrincipal, usingInputStream, usingReader
Fields inherited from interface jakarta.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the header.void
addParameter
(String parameterName, String parameterValue) Adds the parameter.int
getParameter
(String parameterName) int
javax.servlet.http.HttpSession
javax.servlet.http.HttpSession
getSession
(boolean create) static int
Next remote port.static void
Reset remote port.void
setContentLength
(int length) Sets the content length.void
Sets the method.void
setQueryString
(String queryValue) Sets the query string.void
setRemoteAddr
(String value) void
setRemoteHost
(String value) void
setRemoteUser
(String value) Sets the remote user.void
setRequestURI
(String value) Sets the request uri.void
setUserPrincipal
(Principal value) Methods inherited from class org.apache.catalina.connector.Request
addCookie, addLocale, addPathParameter, authenticate, changeSessionId, changeSessionId, checkSwallowInput, clearCookies, clearLocales, convertCookies, createInputStream, doGetSession, finishRequest, getAsyncContext, getAsyncContextInternal, getAttribute, getAttributeNames, getAuthType, getCharacterEncoding, getConnector, getContentLengthLong, getContentType, getContext, getContextPath, getCookies, getCoyoteRequest, getDateHeader, getDecodedRequestURI, getDecodedRequestURIMB, getDiscardFacades, getDispatcherType, getFilterChain, getHeaderNames, getHeaders, getHost, getHttpServletMapping, getInputStream, getIntHeader, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getMappingData, getNote, getParameterMap, getParameterNames, getParameterValues, getPart, getParts, getPathInfo, getPathParameter, getPathTranslated, getPeerAddr, getPrincipal, getProtocol, getProtocolRequestId, getReader, getRequest, getRequestDispatcher, getRequestedSessionId, getRequestId, getRequestPathMB, getRequestURL, getResponse, getScheme, getServerCookies, getServerName, getServerPort, getServletConnection, getServletContext, getServletPath, getSessionInternal, getSessionInternal, getStream, getTrailerFields, getURIConverter, getWrapper, isAsync, isAsyncCompleting, isAsyncDispatching, isAsyncStarted, isAsyncSupported, isFinished, isParametersParsed, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isSecure, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, newPushBuilder, parseCookies, parseLocales, parseLocalesHeader, parseParameters, readChunkedPostBody, readPostBody, readPostBodyFully, recycle, recycleCookieInfo, recycleSessionInfo, removeAttribute, removeNote, setAsyncSupported, setAttribute, setAuthType, setCharacterEncoding, setContentType, setCoyoteRequest, setFilterChain, setLocalPort, setNote, setPathInfo, setRequest, setRequestedSessionCookie, setRequestedSessionId, setRequestedSessionSSL, setRequestedSessionURL, setResponse, setSecure, setServerPort, setURIConverter, startAsync, startAsync, unescape, upgrade
-
Constructor Details
-
SimpleHttpRequest
public SimpleHttpRequest()Instantiates a new simple http request.
-
-
Method Details
-
nextRemotePort
public static int nextRemotePort()Next remote port.- Returns:
- the int
-
resetRemotePort
public static void resetRemotePort()Reset remote port. -
addHeader
Adds the header.- Parameters:
headerName
- the header nameheaderValue
- the header value
-
addParameter
Adds the parameter.- Parameters:
parameterName
- the parameter nameparameterValue
- the parameter value
-
getContentLength
public int getContentLength()- Specified by:
getContentLength
in interfacejakarta.servlet.ServletRequest
- Overrides:
getContentLength
in classorg.apache.catalina.connector.Request
-
getHeader
- Specified by:
getHeader
in interfacejakarta.servlet.http.HttpServletRequest
- Overrides:
getHeader
in classorg.apache.catalina.connector.Request
-
getMethod
- Specified by:
getMethod
in interfacejakarta.servlet.http.HttpServletRequest
- Overrides:
getMethod
in classorg.apache.catalina.connector.Request
-
getParameter
- Specified by:
getParameter
in interfacejakarta.servlet.ServletRequest
- Overrides:
getParameter
in classorg.apache.catalina.connector.Request
-
getQueryString
- Specified by:
getQueryString
in interfacejakarta.servlet.http.HttpServletRequest
- Overrides:
getQueryString
in classorg.apache.catalina.connector.Request
-
getRemoteAddr
- Specified by:
getRemoteAddr
in interfacejakarta.servlet.ServletRequest
- Overrides:
getRemoteAddr
in classorg.apache.catalina.connector.Request
-
getRemoteHost
- Specified by:
getRemoteHost
in interfacejakarta.servlet.ServletRequest
- Overrides:
getRemoteHost
in classorg.apache.catalina.connector.Request
-
getRemotePort
public int getRemotePort()- Specified by:
getRemotePort
in interfacejakarta.servlet.ServletRequest
- Overrides:
getRemotePort
in classorg.apache.catalina.connector.Request
-
getRemoteUser
- Specified by:
getRemoteUser
in interfacejakarta.servlet.http.HttpServletRequest
- Overrides:
getRemoteUser
in classorg.apache.catalina.connector.Request
-
getRequestURI
- Specified by:
getRequestURI
in interfacejakarta.servlet.http.HttpServletRequest
- Overrides:
getRequestURI
in classorg.apache.catalina.connector.Request
-
getSession
public javax.servlet.http.HttpSession getSession()- Specified by:
getSession
in interfacejakarta.servlet.http.HttpServletRequest
- Overrides:
getSession
in classorg.apache.catalina.connector.Request
-
getSession
public javax.servlet.http.HttpSession getSession(boolean create) - Specified by:
getSession
in interfacejakarta.servlet.http.HttpServletRequest
- Overrides:
getSession
in classorg.apache.catalina.connector.Request
-
getUserPrincipal
- Specified by:
getUserPrincipal
in interfacejakarta.servlet.http.HttpServletRequest
- Overrides:
getUserPrincipal
in classorg.apache.catalina.connector.Request
-
setContentLength
public void setContentLength(int length) Sets the content length.- Parameters:
length
- the new content length
-
setMethod
Sets the method.- Parameters:
value
- the new method
-
setQueryString
Sets the query string.- Parameters:
queryValue
- the new query string
-
setRemoteAddr
- Overrides:
setRemoteAddr
in classorg.apache.catalina.connector.Request
-
setRemoteHost
- Overrides:
setRemoteHost
in classorg.apache.catalina.connector.Request
-
setRemoteUser
Sets the remote user.- Parameters:
value
- the new remote user
-
setRequestURI
Sets the request uri.- Parameters:
value
- the new request uri
-
setUserPrincipal
- Overrides:
setUserPrincipal
in classorg.apache.catalina.connector.Request
-