public class RequestScope extends AbstractRequestAttributesScope
Scope
implementation.
Relies on a thread-bound RequestAttributes
instance, which
can be exported through RequestContextListener
,
RequestContextFilter
or
DispatcherServlet
.
This Scope
will also work for Portlet environments,
through an alternate RequestAttributes
implementation
(as exposed out-of-the-box by Spring's
DispatcherPortlet
.
RequestContextHolder.currentRequestAttributes()
,
RequestAttributes.SCOPE_REQUEST
,
RequestContextListener
,
RequestContextFilter
,
DispatcherServlet
,
DispatcherPortlet
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
,
RequestAttributes.SCOPE_GLOBAL_SESSION
public java.lang.String getConversationId()
null
.null
if there is no
conversation ID for the current scope