Class PluginHttpRequestWrapper

java.lang.Object
javax.servlet.ServletRequestWrapper
javax.servlet.http.HttpServletRequestWrapper
com.atlassian.plugin.servlet.PluginHttpRequestWrapper
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class PluginHttpRequestWrapper extends javax.servlet.http.HttpServletRequestWrapper
A request wrapper for requests bound for servlets declared in plugins. Does the necessary path munging for requests so they look like they are for the plugin, rather than the ServletModuleContainerServlet (see PLUG-11).

Also wraps the HttpSession in order to work around a Weblogic Session Attribute serialization problem (see PLUG-515)

  • Field Summary

    Fields inherited from interface javax.servlet.http.HttpServletRequest

    BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
  • Constructor Summary

    Constructors
    Constructor
    Description
    PluginHttpRequestWrapper(javax.servlet.http.HttpServletRequest request, BaseServletModuleDescriptor<?> descriptor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    javax.servlet.http.HttpSession
     
    javax.servlet.http.HttpSession
    getSession(boolean create)
     
    boolean
     
    javax.servlet.AsyncContext
     
    javax.servlet.AsyncContext
    startAsync(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse)
     

    Methods inherited from class javax.servlet.http.HttpServletRequestWrapper

    authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, 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, isSecure, isWrapperFor, isWrapperFor, 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

    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, isSecure, removeAttribute, setAttribute, setCharacterEncoding
  • Constructor Details

    • PluginHttpRequestWrapper

      public PluginHttpRequestWrapper(javax.servlet.http.HttpServletRequest request, BaseServletModuleDescriptor<?> descriptor)
  • Method Details

    • getServletPath

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

      public String getPathInfo()
      Specified by:
      getPathInfo in interface javax.servlet.http.HttpServletRequest
      Overrides:
      getPathInfo in class javax.servlet.http.HttpServletRequestWrapper
    • 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)
      Specified by:
      getSession in interface javax.servlet.http.HttpServletRequest
      Overrides:
      getSession in class javax.servlet.http.HttpServletRequestWrapper
    • isAsyncSupported

      public boolean isAsyncSupported()
      Specified by:
      isAsyncSupported in interface javax.servlet.ServletRequest
      Overrides:
      isAsyncSupported in class javax.servlet.ServletRequestWrapper
      Since:
      4.6.0
    • startAsync

      public javax.servlet.AsyncContext startAsync()
      Specified by:
      startAsync in interface javax.servlet.ServletRequest
      Overrides:
      startAsync in class javax.servlet.ServletRequestWrapper
      Since:
      4.6.0
    • startAsync

      public javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse)
      Specified by:
      startAsync in interface javax.servlet.ServletRequest
      Overrides:
      startAsync in class javax.servlet.ServletRequestWrapper
      Since:
      4.6.0