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

    Constructors
    Constructor
    Description
    Instantiates a new simple http request.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addHeader(String headerName, String headerValue)
    Adds the header.
    void
    addParameter(String parameterName, String parameterValue)
    Adds the parameter.
    int
     
    getHeader(String headerName)
     
     
    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
     
    void
     
    void
    Sets the remote user.
    void
    Sets the request uri.
    void
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public void addHeader(String headerName, String headerValue)
      Adds the header.
      Parameters:
      headerName - the header name
      headerValue - the header value
    • addParameter

      public void addParameter(String parameterName, String parameterValue)
      Adds the parameter.
      Parameters:
      parameterName - the parameter name
      parameterValue - the parameter value
    • getContentLength

      public int getContentLength()
      Specified by:
      getContentLength in interface jakarta.servlet.ServletRequest
      Overrides:
      getContentLength in class org.apache.catalina.connector.Request
    • getHeader

      public String getHeader(String headerName)
      Specified by:
      getHeader in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getHeader in class org.apache.catalina.connector.Request
    • getMethod

      public String getMethod()
      Specified by:
      getMethod in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getMethod in class org.apache.catalina.connector.Request
    • getParameter

      public String getParameter(String parameterName)
      Specified by:
      getParameter in interface jakarta.servlet.ServletRequest
      Overrides:
      getParameter in class org.apache.catalina.connector.Request
    • getQueryString

      public String getQueryString()
      Specified by:
      getQueryString in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getQueryString in class org.apache.catalina.connector.Request
    • getRemoteAddr

      public String getRemoteAddr()
      Specified by:
      getRemoteAddr in interface jakarta.servlet.ServletRequest
      Overrides:
      getRemoteAddr in class org.apache.catalina.connector.Request
    • getRemoteHost

      public String getRemoteHost()
      Specified by:
      getRemoteHost in interface jakarta.servlet.ServletRequest
      Overrides:
      getRemoteHost in class org.apache.catalina.connector.Request
    • getRemotePort

      public int getRemotePort()
      Specified by:
      getRemotePort in interface jakarta.servlet.ServletRequest
      Overrides:
      getRemotePort in class org.apache.catalina.connector.Request
    • getRemoteUser

      public String getRemoteUser()
      Specified by:
      getRemoteUser in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getRemoteUser in class org.apache.catalina.connector.Request
    • getRequestURI

      public String getRequestURI()
      Specified by:
      getRequestURI in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getRequestURI in class org.apache.catalina.connector.Request
    • getSession

      public javax.servlet.http.HttpSession getSession()
      Specified by:
      getSession in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getSession in class org.apache.catalina.connector.Request
    • getSession

      public javax.servlet.http.HttpSession getSession(boolean create)
      Specified by:
      getSession in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getSession in class org.apache.catalina.connector.Request
    • getUserPrincipal

      public Principal getUserPrincipal()
      Specified by:
      getUserPrincipal in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getUserPrincipal in class org.apache.catalina.connector.Request
    • setContentLength

      public void setContentLength(int length)
      Sets the content length.
      Parameters:
      length - the new content length
    • setMethod

      public void setMethod(String value)
      Sets the method.
      Parameters:
      value - the new method
    • setQueryString

      public void setQueryString(String queryValue)
      Sets the query string.
      Parameters:
      queryValue - the new query string
    • setRemoteAddr

      public void setRemoteAddr(String value)
      Overrides:
      setRemoteAddr in class org.apache.catalina.connector.Request
    • setRemoteHost

      public void setRemoteHost(String value)
      Overrides:
      setRemoteHost in class org.apache.catalina.connector.Request
    • setRemoteUser

      public void setRemoteUser(String value)
      Sets the remote user.
      Parameters:
      value - the new remote user
    • setRequestURI

      public void setRequestURI(String value)
      Sets the request uri.
      Parameters:
      value - the new request uri
    • setUserPrincipal

      public void setUserPrincipal(Principal value)
      Overrides:
      setUserPrincipal in class org.apache.catalina.connector.Request