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 ServletResponse getServletResponse()
public void setServletResponse(ServletResponse servletResponse)
public ServletRequest getServletRequest()
public void setServletRequest(ServletRequest servletRequest)
public DispatcherType getDispatcherType()
public void setDispatcherType(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)
public boolean isAsyncSupported()
public String getOverridenSessionId()
public void setOverridenSessionId(String overridenSessionId)
public void setAsyncSupported(boolean asyncSupported)
Copyright © 2016 JBoss by Red Hat. All rights reserved.