public class HystrixDelegatingRequestContext extends Object implements RequestContext
Constructor and Description |
---|
HystrixDelegatingRequestContext(RequestContext delegate) |
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.
|
void |
shutdownHystrixRequestContext() |
public HystrixDelegatingRequestContext(RequestContext delegate)
public void shutdownHystrixRequestContext()
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 long getRequestThreadId()
getRequestThreadId
in interface RequestContext
public com.google.common.base.Optional<Object> getProperty(String name) throws RequestContextPropertyException
RequestContext
getProperty
in interface RequestContext
RequestContextPropertyException
- If there is an issue while accessing the property.public void setPropertyIfAbsent(String name, 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(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.Copyright © 2017 SAP SE. All rights reserved.