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
    --- | ---
    `java.lang.String` | `getRemoteUser()`
    `java.lang.String` | `getRequestedSessionId()`
    `javax.servlet.http.HttpSession` | `getSession()`
    `javax.servlet.http.HttpSession` | `getSession(boolean create)` Create our own sessions.
    `java.security.Principal` | `getUserPrincipal()`
    `boolean` | `isRequestedSessionIdFromCookie()`
    `boolean` | `isRequestedSessionIdFromURL()`
    `boolean` | `isUserInRole(java.lang.String role)`

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

      `getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRequestURI, getRequestURL, getServletPath, isRequestedSessionIdFromUrl, isRequestedSessionIdValid`

    - ### Methods inherited from class javax.servlet.ServletRequestWrapper

      `getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest`

    - ### 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

      `getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding`

- - ### 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 java.lang.String getRequestedSessionId()

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

    - #### getUserPrincipal

          public java.security.Principal getUserPrincipal()

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

    - #### getRemoteUser

          public java.lang.String getRemoteUser()

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

    - #### isUserInRole

          public boolean isUserInRole(java.lang.String role)

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