public class DefaultRequestContext extends Object implements RequestContext
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
ConcurrentMap<String,Object> |
getProperties() |
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() |
int |
hashCode() |
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.
|
String |
toString() |
public com.google.common.base.Optional<javax.servlet.http.HttpServletRequest> getRequest()
getRequest
in interface RequestContext
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).public com.google.common.base.Optional<Object> getProperty(@NonNull String name) throws RequestContextPropertyException
RequestContext
getProperty
in interface RequestContext
RequestContextPropertyException
- If there is an issue while accessing the property.public void setPropertyIfAbsent(@NonNull String name, @NonNull Object value) throws RequestContextPropertyException
RequestContext
setPropertyIfAbsent
in interface RequestContext
RequestContextPropertyException
- If there is an issue while setting the property.public com.google.common.base.Optional<Object> removeProperty(@NonNull String name) throws RequestContextPropertyException
RequestContext
Caution: Implementations may not be thread-safe!
removeProperty
in interface RequestContext
RequestContextPropertyException
- If there is an issue while removing the property.@Generated(value="lombok") public ConcurrentMap<String,Object> getProperties()
@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") public int hashCode()
@Generated(value="lombok") public long getRequestThreadId()
getRequestThreadId
in interface RequestContext
Copyright © 2017 SAP SE. All rights reserved.