com.atlassian.bamboo.util
Class RequestCacheThreadLocal
java.lang.Object
com.atlassian.bamboo.util.RequestCacheThreadLocal
public class RequestCacheThreadLocal
- extends java.lang.Object
|
Method Summary |
static boolean |
canRequestMutateState()
|
static void |
clearRequestCache()
This method should only be called from the RequestCacheThreadLocalFilter |
static java.lang.String |
getContextPath()
|
static javax.servlet.http.HttpServletRequest |
getNonNullRequest()
|
static javax.servlet.http.HttpServletResponse |
getNonNullResponse()
|
static javax.servlet.http.HttpServletRequest |
getRequest()
|
static java.util.Map<java.lang.String,java.lang.Object> |
getRequestCache()
|
static javax.servlet.http.HttpServletResponse |
getResponse()
|
static void |
setRequestCache(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
|
static void |
update(javax.servlet.http.HttpServletRequest request)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTEXT_PATH_KEY
public static final java.lang.String CONTEXT_PATH_KEY
- See Also:
- Constant Field Values
getRequestCache
@NotNull
public static java.util.Map<java.lang.String,java.lang.Object> getRequestCache()
setRequestCache
public static void setRequestCache(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
clearRequestCache
public static void clearRequestCache()
- This method should only be called from the RequestCacheThreadLocalFilter
getContextPath
@Nullable
public static java.lang.String getContextPath()
getRequest
@Nullable
public static javax.servlet.http.HttpServletRequest getRequest()
getResponse
@Nullable
public static javax.servlet.http.HttpServletResponse getResponse()
canRequestMutateState
public static boolean canRequestMutateState()
- Returns:
- true iff we are in a request context and the request is allowed to mutate state
update
public static void update(@NotNull
javax.servlet.http.HttpServletRequest request)
getNonNullRequest
@NotNull
public static javax.servlet.http.HttpServletRequest getNonNullRequest()
getNonNullResponse
@NotNull
public static javax.servlet.http.HttpServletResponse getNonNullResponse()
- Returns:
- current
HttpServletResponse. Throws if called outside of HTTP request context
Copyright © 2014 Atlassian Software Systems Pty Ltd. All Rights Reserved.