| java.lang.Object | |
| ↳ | org.springframework.web.context.request.RequestContextHolder |
Holder class to expose the web request in the form of a thread-bound
Use RequestAttributes object. The request will be inherited
by any child threads spawned by the current thread if the
inheritable flag is set to true.
RequestContextListener or
RequestContextFilter to expose
the current web request. Note that
DispatcherServlet and
DispatcherPortlet already
expose the current request by default.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Return the RequestAttributes currently bound to the thread.
| |||||||||||
Return the RequestAttributes currently bound to the thread.
| |||||||||||
Reset the RequestAttributes for the current thread.
| |||||||||||
Bind the given RequestAttributes to the current thread.
| |||||||||||
Bind the given RequestAttributes to the current thread,
not exposing it as inheritable for child threads.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Return the RequestAttributes currently bound to the thread.
Exposes the previously bound RequestAttributes instance, if any. Falls back to the current JSF FacesContext, if any.
| IllegalStateException | if no RequestAttributes object is bound to the current thread |
|---|
setRequestAttributes(RequestAttributes)ServletRequestAttributesFacesRequestAttributesReturn the RequestAttributes currently bound to the thread.
null if none bound
Reset the RequestAttributes for the current thread.
Bind the given RequestAttributes to the current thread.
| attributes | the RequestAttributes to expose,
or null to reset the thread-bound context |
|---|---|
| inheritable | whether to expose the RequestAttributes as inheritable
for child threads (using an InheritableThreadLocal)
|
Bind the given RequestAttributes to the current thread, not exposing it as inheritable for child threads.
| attributes | the RequestAttributes to expose |
|---|