Class RequestContext
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- org.nuxeo.ecm.platform.web.common.RequestContext
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,Object>
public class RequestContext extends HashMap<String,Object>
An HTTP request context- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected List<RequestCleanupHandler>
cleanupHandlers
protected javax.servlet.http.HttpServletRequest
request
protected javax.servlet.http.HttpServletResponse
response
-
Constructor Summary
Constructors Constructor Description RequestContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRequestCleanupHandler(RequestCleanupHandler handler)
void
dispose()
<T> T
get(String key, Class<T> type)
static RequestContext
getActiveContext()
static RequestContext
getActiveContext(javax.servlet.ServletRequest request)
javax.servlet.http.HttpServletRequest
getRequest()
javax.servlet.http.HttpServletResponse
getResponse()
Principal
getUserPrincipal()
boolean
removeCleanupHandler(RequestCleanupHandler handler)
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Field Detail
-
request
protected javax.servlet.http.HttpServletRequest request
-
response
protected javax.servlet.http.HttpServletResponse response
-
cleanupHandlers
protected List<RequestCleanupHandler> cleanupHandlers
-
-
Method Detail
-
getActiveContext
public static RequestContext getActiveContext()
-
getActiveContext
public static RequestContext getActiveContext(javax.servlet.ServletRequest request)
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest()
-
getResponse
public javax.servlet.http.HttpServletResponse getResponse()
-
getUserPrincipal
public Principal getUserPrincipal()
-
addRequestCleanupHandler
public void addRequestCleanupHandler(RequestCleanupHandler handler)
-
removeCleanupHandler
public boolean removeCleanupHandler(RequestCleanupHandler handler)
-
dispose
public void dispose()
-
-