public class SessionScope extends AbstractRequestAttributesScope
Scope
implementation.
Relies on a thread-bound RequestAttributes
instance, which
can be exported through RequestContextListener
,
RequestContextFilter
or
org.springframework.web.servlet.DispatcherServlet
.
RequestContextHolder.currentRequestAttributes()
,
RequestAttributes.SCOPE_SESSION
,
RequestContextListener
,
RequestContextFilter
,
org.springframework.web.servlet.DispatcherServlet
Constructor and Description |
---|
SessionScope() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.String name,
org.springframework.beans.factory.ObjectFactory<?> objectFactory) |
java.lang.String |
getConversationId() |
protected int |
getScope()
Template method that determines the actual target scope.
|
java.lang.Object |
remove(java.lang.String name) |
registerDestructionCallback, resolveContextualObject
protected int getScope()
AbstractRequestAttributesScope
getScope
in class AbstractRequestAttributesScope
RequestAttributes
constantRequestAttributes.SCOPE_REQUEST
,
RequestAttributes.SCOPE_SESSION
public java.lang.String getConversationId()
public java.lang.Object get(java.lang.String name, org.springframework.beans.factory.ObjectFactory<?> objectFactory)
get
in interface org.springframework.beans.factory.config.Scope
get
in class AbstractRequestAttributesScope
@Nullable public java.lang.Object remove(java.lang.String name)
remove
in interface org.springframework.beans.factory.config.Scope
remove
in class AbstractRequestAttributesScope