public class RequestScope extends AbstractRequestAttributesScope
Scope
implementation.
Relies on a thread-bound RequestAttributes
instance, which
can be exported through RequestContextListener
,
RequestContextFilter
or
DispatcherServlet
.
RequestContextHolder.currentRequestAttributes()
,
RequestAttributes.SCOPE_REQUEST
,
RequestContextListener
,
RequestContextFilter
,
DispatcherServlet
Constructor and Description |
---|
RequestScope() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConversationId()
There is no conversation id concept for a request, so this method
returns
null . |
protected int |
getScope()
Template method that determines the actual target scope.
|
get, registerDestructionCallback, remove, resolveContextualObject
protected int getScope()
AbstractRequestAttributesScope
getScope
in class AbstractRequestAttributesScope
RequestAttributes
constantRequestAttributes.SCOPE_REQUEST
,
RequestAttributes.SCOPE_SESSION
@Nullable public java.lang.String getConversationId()
null
.null
if there is no
conversation ID for the current scope