org.jasig.portal.utils.web
Class PortalWebUtils

java.lang.Object
  extended by org.jasig.portal.utils.web.PortalWebUtils

public final class PortalWebUtils
extends Object

Version:
$Revision: 19776 $
Author:
Eric Dalquist

Field Summary
static String REQUEST_MUTEX_ATTRIBUTE
          Key for the mutex request session attribute
 
Method Summary
static Object getRequestAttributeMutex(ServletRequest servletRequest)
          Return the best available mutex for the given request attributes: that is, an object to synchronize on for the given request attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST_MUTEX_ATTRIBUTE

public static final String REQUEST_MUTEX_ATTRIBUTE
Key for the mutex request session attribute

Method Detail

getRequestAttributeMutex

public static Object getRequestAttributeMutex(ServletRequest servletRequest)
Return the best available mutex for the given request attributes: that is, an object to synchronize on for the given request attributes.

Returns the request attributes mutex attribute if available; usually, this means that the RequestAttributeMutexListener needs to be defined in web.xml. Falls back to the ServletRequest itself if no mutex attribute found.

The request attributes mutex is guaranteed to be the same object during the entire lifetime of the request, available under the key defined by the REQUEST_MUTEX_ATTRIBUTE constant. It serves as a safe reference to synchronize on for locking on the current request attributes.

Parameters:
servletRequest - the ServletRequest to find a mutex for
Returns:
the mutex object (never null)
See Also:
REQUEST_MUTEX_ATTRIBUTE, RequestAttributeMutexListener


Copyright © 2010 Jasig. All Rights Reserved.