public class RequestCacheThreadLocal extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_PATH_KEY |
Modifier and Type | Method and Description |
---|---|
static boolean |
canRequestMutateState() |
static void |
clearRequestCache()
This method should only be called from the RequestCacheThreadLocalFilter
|
static String |
getContextPath() |
static javax.servlet.http.HttpServletRequest |
getNonNullRequest() |
static javax.servlet.http.HttpServletResponse |
getNonNullResponse() |
static javax.servlet.http.HttpServletRequest |
getRequest() |
static Map<String,Object> |
getRequestCache() |
static javax.servlet.http.HttpServletResponse |
getResponse() |
static void |
setRequestCache(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Initialise the threadlocal request cache.
|
static void |
update(javax.servlet.http.HttpServletRequest request) |
public static final String CONTEXT_PATH_KEY
public static void setRequestCache(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
IllegalArgumentException
- in case XSS is suspected in the requestpublic static void clearRequestCache()
@Nullable public static String getContextPath()
@Nullable public static javax.servlet.http.HttpServletRequest getRequest()
@Nullable public static javax.servlet.http.HttpServletResponse getResponse()
public static boolean canRequestMutateState()
public static void update(@NotNull javax.servlet.http.HttpServletRequest request)
IllegalArgumentException
- in case XSS is suspected in the request@NotNull public static javax.servlet.http.HttpServletRequest getNonNullRequest()
@NotNull public static javax.servlet.http.HttpServletResponse getNonNullResponse()
HttpServletResponse
. Throws IllegalStateException
if called outside of HTTP request contextCopyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.