Top Description Constructors Methods
org.springframework.web.context.request

public Class RequestScope

extends AbstractRequestAttributesScope
Class Inheritance
Imports
org.springframework.lang.Nullable

Request-backed org.springframework.beans.factory.config.Scope implementation.

Relies on a thread-bound RequestAttributes instance, which can be exported through RequestContextListener, org.springframework.web.filter.RequestContextFilter or org.springframework.web.servlet.DispatcherServlet.

Authors
Rod Johnson, Juergen Hoeller, Rob Harrop
Since
2.0
See Also
RequestContextHolder#currentRequestAttributes(), RequestAttributes#SCOPE_REQUEST, RequestContextListener, org.springframework.web.filter.RequestContextFilter, org.springframework.web.servlet.DispatcherServlet

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getConversationId()

Implements org.springframework.beans.factory.config.Scope.getConversationId.

There is no conversation id concept for a request, so this method returns null.
protected int
getScope()

Implements abstract org.springframework.web.context.request.AbstractRequestAttributesScope.getScope.

Template method that determines the actual target scope.
Inherited from org.springframework.web.context.request.AbstractRequestAttributesScope:
getregisterDestructionCallbackremoveresolveContextualObject

Constructor Detail

RequestScopeback to summary
public RequestScope()

Method Detail

getConversationIdback to summary
public String getConversationId()

Implements org.springframework.beans.factory.config.Scope.getConversationId.

There is no conversation id concept for a request, so this method returns null.

Returns:String

Doc from org.springframework.beans.factory.config.Scope.getConversationId.

the conversation ID, or null if there is no conversation ID for the current scope

Annotations
@Override
@Nullable
getScopeback to summary
protected int getScope()

Implements abstract org.springframework.web.context.request.AbstractRequestAttributesScope.getScope.

Doc from org.springframework.web.context.request.AbstractRequestAttributesScope.getScope.

Template method that determines the actual target scope.

Returns:int

the target scope, in the form of an appropriate RequestAttributes constant

Annotations
@Override