public class ServletRequestContext extends Object
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.
Modifier and Type | Field and Description |
---|---|
static AttachmentKey<ServletRequestContext> | ATTACHMENT_KEY |
Constructor and Description |
---|
ServletRequestContext(Deployment deployment, HttpServletRequestImpl originalRequest, HttpServletResponseImpl originalResponse, ServletPathMatch originalServletPathMatch) |
public static final AttachmentKey<ServletRequestContext> ATTACHMENT_KEY
public ServletRequestContext(Deployment deployment, HttpServletRequestImpl originalRequest, HttpServletResponseImpl originalResponse, ServletPathMatch originalServletPathMatch)
public static void setCurrentRequestContext(ServletRequestContext servletRequestContext)
public static void clearCurrentServletAttachments()
public static ServletRequestContext requireCurrent()
public static ServletRequestContext current()
public Deployment getDeployment()
public ServletChain getCurrentServlet()
public void setCurrentServlet(ServletChain currentServlet)
public ServletPathMatch getServletPathMatch()
public void setServletPathMatch(ServletPathMatch servletPathMatch)
public List<SingleConstraintMatch> getRequiredConstrains()
public void setRequiredConstrains(List<SingleConstraintMatch> requiredConstrains)
public TransportGuaranteeType getTransportGuarenteeType()
public void setTransportGuarenteeType(TransportGuaranteeType transportGuarenteeType)
public javax.servlet.ServletResponse getServletResponse()
public void setServletResponse(javax.servlet.ServletResponse servletResponse)
public javax.servlet.ServletRequest getServletRequest()
public void setServletRequest(javax.servlet.ServletRequest servletRequest)
public javax.servlet.DispatcherType getDispatcherType()
public void setDispatcherType(javax.servlet.DispatcherType dispatcherType)
public HttpServletRequestImpl getOriginalRequest()
public HttpServletResponseImpl getOriginalResponse()
public HttpSessionImpl getSession()
public void setSession(HttpSessionImpl session)
public HttpServerExchange getExchange()
public ServletPathMatch getOriginalServletPathMatch()
public ServletContextImpl getCurrentServletContext()
public void setCurrentServletContext(ServletContextImpl currentServletContext)
public boolean displayStackTraces()
public void setError(int sc, String msg)
public int getErrorCode()
public String getErrorMessage()
public boolean isRunningInsideHandler()
public void setRunningInsideHandler(boolean runningInsideHandler)
Copyright © 2015 JBoss by Red Hat. All rights reserved.