Class ServletRequestContext


  • public class ServletRequestContext
    extends java.lang.Object
    All the information that servlet needs to attach to the exchange.

    This is all stored under this class, rather than using individual attachments, as this approach has significant performance advantages.

    The ServletInitialHandler also pushed this information to the CURRENT thread local, which allows it to be access even if the request or response have been wrapped with non-compliant wrapper classes.

    Author:
    Stuart Douglas
    • Field Detail

      • ATTACHMENT_KEY

        public static final io.undertow.util.AttachmentKey<ServletRequestContext> ATTACHMENT_KEY
    • Method Detail

      • setCurrentRequestContext

        public static void setCurrentRequestContext​(ServletRequestContext servletRequestContext)
      • clearCurrentServletAttachments

        public static void clearCurrentServletAttachments()
      • getDeployment

        public Deployment getDeployment()
      • getCurrentServlet

        public ServletChain getCurrentServlet()
      • setCurrentServlet

        public void setCurrentServlet​(ServletChain currentServlet)
      • setServletPathMatch

        public void setServletPathMatch​(ServletPathMatch servletPathMatch)
      • setRequiredConstrains

        public void setRequiredConstrains​(java.util.List<SingleConstraintMatch> requiredConstrains)
      • setTransportGuarenteeType

        public void setTransportGuarenteeType​(TransportGuaranteeType transportGuarenteeType)
      • getServletResponse

        public jakarta.servlet.ServletResponse getServletResponse()
      • setServletResponse

        public void setServletResponse​(jakarta.servlet.ServletResponse servletResponse)
      • getServletRequest

        public jakarta.servlet.ServletRequest getServletRequest()
      • setServletRequest

        public void setServletRequest​(jakarta.servlet.ServletRequest servletRequest)
      • getDispatcherType

        public jakarta.servlet.DispatcherType getDispatcherType()
      • setDispatcherType

        public void setDispatcherType​(jakarta.servlet.DispatcherType dispatcherType)
      • getExchange

        public io.undertow.server.HttpServerExchange getExchange()
      • getOriginalServletPathMatch

        public ServletPathMatch getOriginalServletPathMatch()
      • setCurrentServletContext

        public void setCurrentServletContext​(ServletContextImpl currentServletContext)
      • displayStackTraces

        public boolean displayStackTraces()
      • setError

        public void setError​(int sc,
                             java.lang.String msg)
      • getErrorCode

        public int getErrorCode()
      • getErrorMessage

        public java.lang.String getErrorMessage()
      • isRunningInsideHandler

        public boolean isRunningInsideHandler()
      • setRunningInsideHandler

        public void setRunningInsideHandler​(boolean runningInsideHandler)
      • isAsyncSupported

        public boolean isAsyncSupported()
      • getOverridenSessionId

        public java.lang.String getOverridenSessionId()
      • setOverridenSessionId

        public void setOverridenSessionId​(java.lang.String overridenSessionId)
      • setAsyncSupported

        public void setAsyncSupported​(boolean asyncSupported)