SessionCachingFilter.RequestWrapper (Apache Geode 1.9.1)
Date: 2019-08-30

org.apache.geode.modules.session.filter

## Class SessionCachingFilter.RequestWrapper

- java.lang.Object
- - javax.servlet.ServletRequestWrapper
  - - javax.servlet.http.HttpServletRequestWrapper
    - - org.apache.geode.modules.session.filter.SessionCachingFilter.RequestWrapper

- All Implemented Interfaces:
    javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest
  Enclosing class:
    SessionCachingFilter

      public static class SessionCachingFilter.RequestWrapper
      extends javax.servlet.http.HttpServletRequestWrapper

  This request wrapper class extends the support class HttpServletRequestWrapper, which implements all the methods in the HttpServletRequest interface, as delegations to the wrapped request. You only need to override the methods that you need to change. You can get access to the wrapped request using the method getRequest()

- - ### Field Summary

    - ### Fields inherited from interface javax.servlet.http.HttpServletRequest

      `BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestWrapper(org.apache.geode.modules.session.internal.filter.SessionManager manager, javax.servlet.http.HttpServletRequest request, org.apache.geode.modules.session.filter.SessionCachingFilter.ResponseWrapper response, javax.servlet.ServletContext context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getRemoteUser()`
    `String` | `getRequestedSessionId()`
    `javax.servlet.http.HttpSession` | `getSession()`
    `javax.servlet.http.HttpSession` | `getSession(boolean create)` Create our own sessions.
    `Principal` | `getUserPrincipal()`
    `boolean` | `isRequestedSessionIdFromCookie()`
    `boolean` | `isRequestedSessionIdFromURL()`
    `boolean` | `isUserInRole(String role)`

    - ### Methods inherited from class javax.servlet.http.HttpServletRequestWrapper

      `authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRequestURI, getRequestURL, getServletPath, isRequestedSessionIdFromUrl, isRequestedSessionIdValid, login, logout, upgrade`

    - ### Methods inherited from class javax.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 javax.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

    - #### RequestWrapper

          public RequestWrapper(org.apache.geode.modules.session.internal.filter.SessionManager manager,
                                javax.servlet.http.HttpServletRequest request,
                                org.apache.geode.modules.session.filter.SessionCachingFilter.ResponseWrapper response,
                                javax.servlet.ServletContext context)

  - ### Method Detail

    - #### getSession

          public javax.servlet.http.HttpSession getSession()

      Specified by:
        `getSession` in interface `javax.servlet.http.HttpServletRequest`
      Overrides:
        `getSession` in class `javax.servlet.http.HttpServletRequestWrapper`

    - #### getSession

          public javax.servlet.http.HttpSession getSession(boolean create)

      Create our own sessions. TODO: Handle invalidated sessions
      Specified by:
        `getSession` in interface `javax.servlet.http.HttpServletRequest`
      Overrides:
        `getSession` in class `javax.servlet.http.HttpServletRequestWrapper`
      Returns:
        a HttpSession

    - #### isRequestedSessionIdFromCookie

          public boolean isRequestedSessionIdFromCookie()

      Specified by:
        `isRequestedSessionIdFromCookie` in interface `javax.servlet.http.HttpServletRequest`
      Overrides:
        `isRequestedSessionIdFromCookie` in class `javax.servlet.http.HttpServletRequestWrapper`

    - #### isRequestedSessionIdFromURL

          public boolean isRequestedSessionIdFromURL()

      Specified by:
        `isRequestedSessionIdFromURL` in interface `javax.servlet.http.HttpServletRequest`
      Overrides:
        `isRequestedSessionIdFromURL` in class `javax.servlet.http.HttpServletRequestWrapper`

    - #### getRequestedSessionId

          public String getRequestedSessionId()

      Specified by:
        `getRequestedSessionId` in interface `javax.servlet.http.HttpServletRequest`
      Overrides:
        `getRequestedSessionId` in class `javax.servlet.http.HttpServletRequestWrapper`

    - #### getUserPrincipal

          public Principal getUserPrincipal()

      Specified by:
        `getUserPrincipal` in interface `javax.servlet.http.HttpServletRequest`
      Overrides:
        `getUserPrincipal` in class `javax.servlet.http.HttpServletRequestWrapper`

    - #### getRemoteUser

          public String getRemoteUser()

      Specified by:
        `getRemoteUser` in interface `javax.servlet.http.HttpServletRequest`
      Overrides:
        `getRemoteUser` in class `javax.servlet.http.HttpServletRequestWrapper`

    - #### isUserInRole

          public boolean isUserInRole(String role)

      Specified by:
        `isUserInRole` in interface `javax.servlet.http.HttpServletRequest`
      Overrides:
        `isUserInRole` in class `javax.servlet.http.HttpServletRequestWrapper`