com.atlassian.bamboo.util
Class RequestCacheThreadLocal

java.lang.Object
  extended by com.atlassian.bamboo.util.RequestCacheThreadLocal

public class RequestCacheThreadLocal
extends Object


Field Summary
static String CONTEXT_PATH_KEY
           
 
Method Summary
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)
           
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
 

Field Detail

CONTEXT_PATH_KEY

public static final String CONTEXT_PATH_KEY
See Also:
Constant Field Values
Method Detail

getRequestCache

@NotNull
public static Map<String,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 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 © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.