Class AsyncHttpDispatchWrapper

java.lang.Object
jakarta.servlet.ServletRequestWrapper
jakarta.servlet.http.HttpServletRequestWrapper
cloud.piranha.core.impl.AsyncHttpDispatchWrapper
All Implemented Interfaces:
WebApplicationRequest, jakarta.servlet.http.HttpServletRequest, jakarta.servlet.ServletRequest

public class AsyncHttpDispatchWrapper extends jakarta.servlet.http.HttpServletRequestWrapper implements WebApplicationRequest
The async HTTP dispatch wrapper.
Author:
Manfred Riem ([email protected])
  • Field Summary

    Fields inherited from interface jakarta.servlet.http.HttpServletRequest

    BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
  • Constructor Summary

    Constructors
    Constructor
    Description
    AsyncHttpDispatchWrapper(jakarta.servlet.http.HttpServletRequest request)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    jakarta.servlet.DispatcherType
     
    jakarta.servlet.MultipartConfigElement
    Returns the multipartConfig.
    Get the parameter.
    Returns the parameter map.
    Returns the parameter names.
    Returns the parameter values.
     
     
    jakarta.servlet.http.HttpServletRequest
     
     
    Returns the request URI with query string.
     
    Returns the wrapper attributes.
    Returns the wrapper parameters.
    boolean
     
    void
     
    void
    Set as a wrapper attribute.
    void
    setAttribute(String name, Object object)
     
    void
    setAuthType(String authType)
    Set the auth type.
    void
    setContextPath(String contextPath)
    Set the context path.
    void
    setDispatcherType(jakarta.servlet.DispatcherType dispatcherType)
    Set the dispatcher type.
    void
    setPathInfo(String pathInfo)
    Set the path info.
    void
    setQueryString(String queryString)
    Set the query string.
    void
    setRequestURI(String requestURI)
    Set the request URI.
    void
    setServletPath(String servletPath)
    Set the servlet path.
    void
    setUserPrincipal(Principal userPrincipal)
    Set the user principal.
    void
    Set the web application.
    jakarta.servlet.AsyncContext
     
    jakarta.servlet.AsyncContext
    startAsync(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse)
     
     

    Methods inherited from class jakarta.servlet.http.HttpServletRequestWrapper

    authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathTranslated, getRemoteUser, getRequestedSessionId, getRequestURL, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgrade

    Methods inherited from class jakarta.servlet.ServletRequestWrapper

    getAsyncContext, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getProtocolRequestId, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, setCharacterEncoding, setRequest

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface jakarta.servlet.http.HttpServletRequest

    authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathTranslated, getRemoteUser, getRequestedSessionId, getRequestURL, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgrade

    Methods inherited from interface jakarta.servlet.ServletRequest

    getAsyncContext, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getProtocolRequestId, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncSupported, isSecure, setCharacterEncoding

    Methods inherited from interface cloud.piranha.core.api.WebApplicationRequest

    getUpgradeHandler, isUpgraded
  • Constructor Details

    • AsyncHttpDispatchWrapper

      public AsyncHttpDispatchWrapper(jakarta.servlet.http.HttpServletRequest request)
      Constructor.
      Parameters:
      request - the HTTP servlet request.
  • Method Details

    • getRequest

      public jakarta.servlet.http.HttpServletRequest getRequest()
      Overrides:
      getRequest in class jakarta.servlet.ServletRequestWrapper
    • getDispatcherType

      public jakarta.servlet.DispatcherType getDispatcherType()
      Specified by:
      getDispatcherType in interface jakarta.servlet.ServletRequest
      Overrides:
      getDispatcherType in class jakarta.servlet.ServletRequestWrapper
    • getServletPath

      public String getServletPath()
      Specified by:
      getServletPath in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getServletPath in class jakarta.servlet.http.HttpServletRequestWrapper
    • getPathInfo

      public String getPathInfo()
      Specified by:
      getPathInfo in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getPathInfo in class jakarta.servlet.http.HttpServletRequestWrapper
    • setPathInfo

      public void setPathInfo(String pathInfo)
      Set the path info.
      Parameters:
      pathInfo - the path info.
    • getRequestURI

      public String getRequestURI()
      Specified by:
      getRequestURI in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getRequestURI in class jakarta.servlet.http.HttpServletRequestWrapper
    • setRequestURI

      public void setRequestURI(String requestURI)
      Set the request URI.
      Parameters:
      requestURI - the request URI.
    • getQueryString

      public String getQueryString()
      Specified by:
      getQueryString in interface jakarta.servlet.http.HttpServletRequest
      Overrides:
      getQueryString in class jakarta.servlet.http.HttpServletRequestWrapper
    • startAsync

      public jakarta.servlet.AsyncContext startAsync() throws IllegalStateException
      Specified by:
      startAsync in interface jakarta.servlet.ServletRequest
      Overrides:
      startAsync in class jakarta.servlet.ServletRequestWrapper
      Throws:
      IllegalStateException
    • startAsync

      public jakarta.servlet.AsyncContext startAsync(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse) throws IllegalStateException
      Specified by:
      startAsync in interface jakarta.servlet.ServletRequest
      Overrides:
      startAsync in class jakarta.servlet.ServletRequestWrapper
      Throws:
      IllegalStateException
    • isAsyncStarted

      public boolean isAsyncStarted()
      Specified by:
      isAsyncStarted in interface jakarta.servlet.ServletRequest
      Overrides:
      isAsyncStarted in class jakarta.servlet.ServletRequestWrapper
    • getAttributeNames

      public Enumeration<String> getAttributeNames()
      Specified by:
      getAttributeNames in interface jakarta.servlet.ServletRequest
      Overrides:
      getAttributeNames in class jakarta.servlet.ServletRequestWrapper
    • getAttribute

      public Object getAttribute(String name)
      Specified by:
      getAttribute in interface jakarta.servlet.ServletRequest
      Overrides:
      getAttribute in class jakarta.servlet.ServletRequestWrapper
    • setAttribute

      public void setAttribute(String name, Object object)
      Specified by:
      setAttribute in interface jakarta.servlet.ServletRequest
      Overrides:
      setAttribute in class jakarta.servlet.ServletRequestWrapper
    • removeAttribute

      public void removeAttribute(String name)
      Specified by:
      removeAttribute in interface jakarta.servlet.ServletRequest
      Overrides:
      removeAttribute in class jakarta.servlet.ServletRequestWrapper
    • getParameter

      public String getParameter(String name)
      Get the parameter.
      Specified by:
      getParameter in interface jakarta.servlet.ServletRequest
      Overrides:
      getParameter in class jakarta.servlet.ServletRequestWrapper
      Parameters:
      name - the name.
      Returns:
      the value.
    • getParameterMap

      public Map<String,String[]> getParameterMap()
      Returns the parameter map.
      Specified by:
      getParameterMap in interface jakarta.servlet.ServletRequest
      Overrides:
      getParameterMap in class jakarta.servlet.ServletRequestWrapper
      Returns:
      the parameter map
    • getParameterNames

      public Enumeration<String> getParameterNames()
      Returns the parameter names.
      Specified by:
      getParameterNames in interface jakarta.servlet.ServletRequest
      Overrides:
      getParameterNames in class jakarta.servlet.ServletRequestWrapper
      Returns:
      the parameter names
    • getParameterValues

      public String[] getParameterValues(String name)
      Returns the parameter values.
      Specified by:
      getParameterValues in interface jakarta.servlet.ServletRequest
      Overrides:
      getParameterValues in class jakarta.servlet.ServletRequestWrapper
      Parameters:
      name - the parameter name.
      Returns:
      the parameter values
    • setQueryString

      public void setQueryString(String queryString)
      Set the query string.
      Parameters:
      queryString - the query string.
    • setAsWrapperAttribute

      public void setAsWrapperAttribute(String name, Object value)
      Set as a wrapper attribute.
      Parameters:
      name - the name.
      value - the value.
    • getWrapperAttributes

      public List<String> getWrapperAttributes()
      Returns the wrapper attributes.
      Returns:
      the wrapper attributes
    • getWrapperParameters

      public Map<String,String[]> getWrapperParameters()
      Returns the wrapper parameters.
      Returns:
      the wrapper parameters
    • setDispatcherType

      public void setDispatcherType(jakarta.servlet.DispatcherType dispatcherType)
      Description copied from interface: WebApplicationRequest
      Set the dispatcher type.
      Specified by:
      setDispatcherType in interface WebApplicationRequest
      Parameters:
      dispatcherType - the dispatcher type.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getRequestURIWithQueryString

      public String getRequestURIWithQueryString()
      Returns the request URI with query string.
      Returns:
      the request URI with query string
    • setContextPath

      public void setContextPath(String contextPath)
      Description copied from interface: WebApplicationRequest
      Set the context path.
      Specified by:
      setContextPath in interface WebApplicationRequest
      Parameters:
      contextPath - the context path.
    • setServletPath

      public void setServletPath(String servletPath)
      Description copied from interface: WebApplicationRequest
      Set the servlet path.
      Specified by:
      setServletPath in interface WebApplicationRequest
      Parameters:
      servletPath - the servlet path.
    • setAuthType

      public void setAuthType(String authType)
      Description copied from interface: WebApplicationRequest
      Set the auth type.
      Specified by:
      setAuthType in interface WebApplicationRequest
      Parameters:
      authType - the auth type.
    • setUserPrincipal

      public void setUserPrincipal(Principal userPrincipal)
      Description copied from interface: WebApplicationRequest
      Set the user principal.
      Specified by:
      setUserPrincipal in interface WebApplicationRequest
      Parameters:
      userPrincipal - the user principal.
    • setWebApplication

      public void setWebApplication(WebApplication webApplication)
      Description copied from interface: WebApplicationRequest
      Set the web application.
      Specified by:
      setWebApplication in interface WebApplicationRequest
      Parameters:
      webApplication - the web application.
    • getMultipartConfig

      public jakarta.servlet.MultipartConfigElement getMultipartConfig()
      Description copied from interface: WebApplicationRequest
      Returns the multipartConfig.
      Specified by:
      getMultipartConfig in interface WebApplicationRequest
      Returns:
      the multipartConfig