Class AbstractRequestAttributesScope
java.lang.Object
org.springframework.web.context.request.AbstractRequestAttributesScope
- All Implemented Interfaces:
org.springframework.beans.factory.config.Scope
- Direct Known Subclasses:
RequestScope
,SessionScope
public abstract class AbstractRequestAttributesScope
extends Object
implements org.springframework.beans.factory.config.Scope
Abstract
Scope
implementation that reads from a particular scope
in the current thread-bound RequestAttributes
object.
Subclasses simply need to implement getScope()
to instruct
this class which RequestAttributes
scope to read attributes from.
Subclasses may wish to override the get(java.lang.String, org.springframework.beans.factory.ObjectFactory<?>)
and remove(java.lang.String)
methods to add synchronization around the call back into this superclass.
- Since:
- 2.0
- Author:
- Rod Johnson, Juergen Hoeller, Rob Harrop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int
getScope()
Template method that determines the actual target scope.void
registerDestructionCallback
(String name, Runnable callback) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.config.Scope
getConversationId
-
Constructor Details
-
AbstractRequestAttributesScope
public AbstractRequestAttributesScope()
-
-
Method Details
-
get
-
remove
-
registerDestructionCallback
-
resolveContextualObject
-
getScope
protected abstract int getScope()Template method that determines the actual target scope.- Returns:
- the target scope, in the form of an appropriate
RequestAttributes
constant - See Also:
-