public class ThreadLocalRequestContextFacade extends AbstractRequestContextFacade
RequestContextFacade
that internally uses InheritableThreadLocal
to provide access
to the respective RequestContext
.
Important: This implementation should only be used when relying on container-managed threads only. In case you use a framework that manages threads (such as Hystrix), you have to rely on an implementation that is adjusted to your framework.
Constructor and Description |
---|
ThreadLocalRequestContextFacade() |
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<RequestContext> |
getCurrentRequestContext() |
void |
removeCurrentContext()
Removes the current
RequestContext . |
void |
setCurrentContext(RequestContext requestContext)
Sets the current
RequestContext . |
getCurrentRequest, getRequestContextProperty
public com.google.common.base.Optional<RequestContext> getCurrentRequestContext()
RequestContext
, if present.public void setCurrentContext(RequestContext requestContext)
RequestContext
.public void removeCurrentContext()
RequestContext
.Copyright © 2018 SAP SE. All rights reserved.