public interface RequestContext
RequestContextServletFilter
. In case an instance is required outside the normal servlet lifecycle (e.g.
within background tasks), refer to RequestContextExecutor
.RequestContextListener
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<Object> |
getProperty(String name)
Retrieves the property for the given name.
|
com.google.common.base.Optional<javax.servlet.http.HttpServletRequest> |
getRequest() |
long |
getRequestThreadId() |
com.google.common.base.Optional<Object> |
removeProperty(String name)
Removes the property with the given name.
|
void |
setPropertyIfAbsent(String name,
Object value)
Retrieves the property for the given name.
|
com.google.common.base.Optional<javax.servlet.http.HttpServletRequest> getRequest()
HttpServletRequest
of this instance, if present. Can be absent if the RequestContext
has been created by a RequestContextExecutor
when running outside the normal servlet lifecycle
(e.g. within background tasks).long getRequestThreadId()
com.google.common.base.Optional<Object> getProperty(@NonNull String name) throws RequestContextPropertyException
RequestContextPropertyException
- If there is an issue while accessing the property.void setPropertyIfAbsent(@NonNull String name, @NonNull Object value) throws RequestContextPropertyException
RequestContextPropertyException
- If there is an issue while setting the property.com.google.common.base.Optional<Object> removeProperty(@NonNull String name) throws RequestContextPropertyException
Caution: Implementations may not be thread-safe!
RequestContextPropertyException
- If there is an issue while removing the property.Copyright © 2018 SAP SE. All rights reserved.