|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.web.util.RequestHolder
public abstract class RequestHolder
Class to manage thread-bound HttpServletRequest.
Field Summary | |
---|---|
static ThreadLocal |
currentRequest
Holder for the current request. |
Constructor Summary | |
---|---|
RequestHolder()
|
Method Summary | |
---|---|
static void |
bind(HttpServletRequest request)
|
static void |
clear()
Clear any request bound to the thread. |
static HttpServletRequest |
currentRequest()
Return the request currently bound to the thread. |
static HttpSession |
currentSession()
Convenient method to return the session associated with the current request, creating one if none exists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static ThreadLocal currentRequest
Constructor Detail |
---|
public RequestHolder()
Method Detail |
---|
public static void bind(HttpServletRequest request)
public static void clear()
public static HttpServletRequest currentRequest() throws IllegalStateException
IllegalStateException
- if no request is bound to the
current threadpublic static HttpSession currentSession()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |