RequestAttributes object. The request will be inherited
by any child threads spawned by the current thread if the
inheritable flag is set to true.
Use RequestContextListener or
org. to expose
the current web request. Note that
org.
already exposes the current request by default.
RequestContextListener, org.springframework.web.filter.RequestContextFilter , org.springframework.web.servlet.DispatcherServlet
| Modifier and Type | Class and Description |
|---|---|
| private static class | RequestContextHolder.
Inner class to avoid hard-coded JSF dependency. |
| Modifier and Type | Field and Description |
|---|---|
| private static final ThreadLocal | |
| private static final boolean | |
| private static final ThreadLocal |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static RequestAttributes | Returns: the RequestAttributes currently bound to the threadReturn the RequestAttributes currently bound to the thread. |
| public static RequestAttributes | Returns: the RequestAttributes currently bound to the thread, ornull if none boundReturn the RequestAttributes currently bound to the thread. |
| public static void | |
| public static void | setRequestAttributes(RequestAttributes
the RequestAttributes to expose attributes)Bind the given RequestAttributes to the current thread, not exposing it as inheritable for child threads. |
| public static void | setRequestAttributes(RequestAttributes
the RequestAttributes to expose,
or attributes, boolean null to reset the thread-bound contextwhether to expose the RequestAttributes as inheritable
for child threads (using an inheritable)InheritableThreadLocal)Bind the given RequestAttributes to the current thread. |
| inheritableRequestAttributesHolder | back to summary |
|---|---|
| private static final ThreadLocal<RequestAttributes> inheritableRequestAttributesHolder | |
| jsfPresent | back to summary |
|---|---|
| private static final boolean jsfPresent | |
| requestAttributesHolder | back to summary |
|---|---|
| private static final ThreadLocal<RequestAttributes> requestAttributesHolder | |
| RequestContextHolder | back to summary |
|---|---|
| public RequestContextHolder() | |
| currentRequestAttributes | back to summary |
|---|---|
| public static RequestAttributes currentRequestAttributes() throws IllegalStateException 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.
| |
| getRequestAttributes | back to summary |
|---|---|
| public static RequestAttributes getRequestAttributes() Return the RequestAttributes currently bound to the thread.
| |
| resetRequestAttributes | back to summary |
|---|---|
| public static void resetRequestAttributes() Reset the RequestAttributes for the current thread. | |
| setRequestAttributes | back to summary |
|---|---|
| public static void setRequestAttributes(RequestAttributes attributes) Bind the given RequestAttributes to the current thread, not exposing it as inheritable for child threads.
| |
| setRequestAttributes | back to summary |
|---|---|
| public static void setRequestAttributes(RequestAttributes attributes, boolean inheritable) Bind the given RequestAttributes to the current thread.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static RequestAttributes |
| FacesRequestAttributesFactory | back to summary |
|---|---|
| private FacesRequestAttributesFactory() | |
| getFacesRequestAttributes | back to summary |
|---|---|
public static RequestAttributes getFacesRequestAttributes()
| |