Class ServletRequestHttpWrapper

  • All Implemented Interfaces:
    jakarta.servlet.http.HttpServletRequest, jakarta.servlet.ServletRequest

    public class ServletRequestHttpWrapper
    extends jakarta.servlet.ServletRequestWrapper
    implements jakarta.servlet.http.HttpServletRequest
    ServletRequestHttpWrapper Class to tunnel a ServletRequest via an HttpServletRequest
    • Field Summary

      • Fields inherited from interface jakarta.servlet.http.HttpServletRequest

        BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
    • Constructor Summary

      Constructors 
      Constructor Description
      ServletRequestHttpWrapper​(jakarta.servlet.ServletRequest request)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean authenticate​(jakarta.servlet.http.HttpServletResponse response)  
      java.lang.String changeSessionId()  
      java.lang.String getAuthType()  
      java.lang.String getContextPath()  
      jakarta.servlet.http.Cookie[] getCookies()  
      long getDateHeader​(java.lang.String name)  
      java.lang.String getHeader​(java.lang.String name)  
      java.util.Enumeration<java.lang.String> getHeaderNames()  
      java.util.Enumeration<java.lang.String> getHeaders​(java.lang.String name)  
      int getIntHeader​(java.lang.String name)  
      java.lang.String getMethod()  
      jakarta.servlet.http.Part getPart​(java.lang.String name)  
      java.util.Collection<jakarta.servlet.http.Part> getParts()  
      java.lang.String getPathInfo()  
      java.lang.String getPathTranslated()  
      java.lang.String getQueryString()  
      java.lang.String getRemoteUser()  
      java.lang.String getRequestedSessionId()  
      java.lang.String getRequestURI()  
      java.lang.StringBuffer getRequestURL()  
      java.lang.String getServletPath()  
      jakarta.servlet.http.HttpSession getSession()  
      jakarta.servlet.http.HttpSession getSession​(boolean create)  
      java.security.Principal getUserPrincipal()  
      boolean isRequestedSessionIdFromCookie()  
      boolean isRequestedSessionIdFromUrl()
      Deprecated.
      boolean isRequestedSessionIdFromURL()  
      boolean isRequestedSessionIdValid()  
      boolean isUserInRole​(java.lang.String role)  
      void login​(java.lang.String username, java.lang.String password)  
      void logout()  
      <T extends jakarta.servlet.http.HttpUpgradeHandler>
      T
      upgrade​(java.lang.Class<T> handlerClass)  
      • Methods inherited from class jakarta.servlet.ServletRequestWrapper

        getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface jakarta.servlet.http.HttpServletRequest

        getHttpServletMapping, getTrailerFields, isTrailerFieldsReady, newPushBuilder
      • Methods inherited from interface jakarta.servlet.ServletRequest

        getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
    • Constructor Detail

      • ServletRequestHttpWrapper

        public ServletRequestHttpWrapper​(jakarta.servlet.ServletRequest request)
    • Method Detail

      • getAuthType

        public java.lang.String getAuthType()
        Specified by:
        getAuthType in interface jakarta.servlet.http.HttpServletRequest
      • getCookies

        public jakarta.servlet.http.Cookie[] getCookies()
        Specified by:
        getCookies in interface jakarta.servlet.http.HttpServletRequest
      • getDateHeader

        public long getDateHeader​(java.lang.String name)
        Specified by:
        getDateHeader in interface jakarta.servlet.http.HttpServletRequest
      • getHeader

        public java.lang.String getHeader​(java.lang.String name)
        Specified by:
        getHeader in interface jakarta.servlet.http.HttpServletRequest
      • getHeaders

        public java.util.Enumeration<java.lang.String> getHeaders​(java.lang.String name)
        Specified by:
        getHeaders in interface jakarta.servlet.http.HttpServletRequest
      • getHeaderNames

        public java.util.Enumeration<java.lang.String> getHeaderNames()
        Specified by:
        getHeaderNames in interface jakarta.servlet.http.HttpServletRequest
      • getIntHeader

        public int getIntHeader​(java.lang.String name)
        Specified by:
        getIntHeader in interface jakarta.servlet.http.HttpServletRequest
      • getMethod

        public java.lang.String getMethod()
        Specified by:
        getMethod in interface jakarta.servlet.http.HttpServletRequest
      • getPathInfo

        public java.lang.String getPathInfo()
        Specified by:
        getPathInfo in interface jakarta.servlet.http.HttpServletRequest
      • getPathTranslated

        public java.lang.String getPathTranslated()
        Specified by:
        getPathTranslated in interface jakarta.servlet.http.HttpServletRequest
      • getContextPath

        public java.lang.String getContextPath()
        Specified by:
        getContextPath in interface jakarta.servlet.http.HttpServletRequest
      • getQueryString

        public java.lang.String getQueryString()
        Specified by:
        getQueryString in interface jakarta.servlet.http.HttpServletRequest
      • getRemoteUser

        public java.lang.String getRemoteUser()
        Specified by:
        getRemoteUser in interface jakarta.servlet.http.HttpServletRequest
      • isUserInRole

        public boolean isUserInRole​(java.lang.String role)
        Specified by:
        isUserInRole in interface jakarta.servlet.http.HttpServletRequest
      • getUserPrincipal

        public java.security.Principal getUserPrincipal()
        Specified by:
        getUserPrincipal in interface jakarta.servlet.http.HttpServletRequest
      • getRequestedSessionId

        public java.lang.String getRequestedSessionId()
        Specified by:
        getRequestedSessionId in interface jakarta.servlet.http.HttpServletRequest
      • getRequestURI

        public java.lang.String getRequestURI()
        Specified by:
        getRequestURI in interface jakarta.servlet.http.HttpServletRequest
      • getRequestURL

        public java.lang.StringBuffer getRequestURL()
        Specified by:
        getRequestURL in interface jakarta.servlet.http.HttpServletRequest
      • getServletPath

        public java.lang.String getServletPath()
        Specified by:
        getServletPath in interface jakarta.servlet.http.HttpServletRequest
      • getSession

        public jakarta.servlet.http.HttpSession getSession​(boolean create)
        Specified by:
        getSession in interface jakarta.servlet.http.HttpServletRequest
      • getSession

        public jakarta.servlet.http.HttpSession getSession()
        Specified by:
        getSession in interface jakarta.servlet.http.HttpServletRequest
      • isRequestedSessionIdValid

        public boolean isRequestedSessionIdValid()
        Specified by:
        isRequestedSessionIdValid in interface jakarta.servlet.http.HttpServletRequest
      • isRequestedSessionIdFromCookie

        public boolean isRequestedSessionIdFromCookie()
        Specified by:
        isRequestedSessionIdFromCookie in interface jakarta.servlet.http.HttpServletRequest
      • isRequestedSessionIdFromURL

        public boolean isRequestedSessionIdFromURL()
        Specified by:
        isRequestedSessionIdFromURL in interface jakarta.servlet.http.HttpServletRequest
      • isRequestedSessionIdFromUrl

        @Deprecated(since="Servlet API 2.1")
        public boolean isRequestedSessionIdFromUrl()
        Deprecated.
        Specified by:
        isRequestedSessionIdFromUrl in interface jakarta.servlet.http.HttpServletRequest
      • authenticate

        public boolean authenticate​(jakarta.servlet.http.HttpServletResponse response)
                             throws java.io.IOException,
                                    jakarta.servlet.ServletException
        Specified by:
        authenticate in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        java.io.IOException
        jakarta.servlet.ServletException
      • getPart

        public jakarta.servlet.http.Part getPart​(java.lang.String name)
                                          throws java.io.IOException,
                                                 jakarta.servlet.ServletException
        Specified by:
        getPart in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        java.io.IOException
        jakarta.servlet.ServletException
      • getParts

        public java.util.Collection<jakarta.servlet.http.Part> getParts()
                                                                 throws java.io.IOException,
                                                                        jakarta.servlet.ServletException
        Specified by:
        getParts in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        java.io.IOException
        jakarta.servlet.ServletException
      • login

        public void login​(java.lang.String username,
                          java.lang.String password)
                   throws jakarta.servlet.ServletException
        Specified by:
        login in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        jakarta.servlet.ServletException
      • logout

        public void logout()
                    throws jakarta.servlet.ServletException
        Specified by:
        logout in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        jakarta.servlet.ServletException
      • changeSessionId

        public java.lang.String changeSessionId()
        Specified by:
        changeSessionId in interface jakarta.servlet.http.HttpServletRequest
      • upgrade

        public <T extends jakarta.servlet.http.HttpUpgradeHandler> T upgrade​(java.lang.Class<T> handlerClass)
                                                                      throws java.io.IOException,
                                                                             jakarta.servlet.ServletException
        Specified by:
        upgrade in interface jakarta.servlet.http.HttpServletRequest
        Throws:
        java.io.IOException
        jakarta.servlet.ServletException