public final class HttpServletRequestResponseContext extends Object
See also RequestResponseContextFilter
, which is a Java Servlet Filter
-based way
to populate and clean up this context in a servlet container.
Modifier and Type | Method and Description |
---|---|
static void |
clearCurrent()
Clear the current thread-local context instances.
|
static HttpServletRequest |
getRequest()
Get the current
HttpServletRequest being serviced by the current thread. |
static HttpServletResponse |
getResponse()
Get the current
HttpServletResponse being serviced by the current thread. |
static void |
loadCurrent(HttpServletRequest request,
HttpServletResponse response)
Load the thread-local storage with the current request and response.
|
public static void loadCurrent(@Nonnull HttpServletRequest request, @Nonnull HttpServletResponse response)
request
- the current HttpServletRequest
response
- the current HttpServletResponse
public static void clearCurrent()
@Nullable public static HttpServletRequest getRequest()
HttpServletRequest
being serviced by the current thread.@Nullable public static HttpServletResponse getResponse()
HttpServletResponse
being serviced by the current thread.Copyright © 2016 JBoss by Red Hat. All rights reserved.