org.springframework.beans.factory.config.Scope
implementation.
Relies on a thread-bound RequestAttributes instance, which
can be exported through RequestContextListener,
org. or
org..
RequestContextHolder#currentRequestAttributes(), RequestAttributes#SCOPE_SESSION, RequestContextListener, org.springframework.web.filter.RequestContextFilter , org.springframework.web.servlet.DispatcherServlet
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | get(String
the name of the object to retrieve name, ObjectFactory<?> the objectFactory)ObjectFactory to use to create the scoped
object if it is not present in the underlying storage mechanismOverrides org. Implements org. Return the object with the given name from the underlying scope,
|
| public String | getConversationId()
Implements org. Return the conversation ID for the current underlying scope, if any. |
| protected int | getScope()
Implements abstract org. Template method that determines the actual target scope. |
| public Object | remove(String
the name of the object to remove name)Overrides org. Implements org. Remove the object with the given |
| SessionScope | back to summary |
|---|---|
| public SessionScope() | |
| get | back to summary |
|---|---|
| public Object get(String name, ObjectFactory<?> objectFactory) Overrides org. Implements org. Doc from org. Return the object with the given name from the underlying scope,
This is the central operation of a Scope, and the only operation that is absolutely required.
| |
| getConversationId | back to summary |
|---|---|
| public String getConversationId() Implements org. Doc from org. Return the conversation ID for the current underlying scope, if any. The exact meaning of the conversation ID depends on the underlying
storage mechanism. In the case of session-scoped objects, the
conversation ID would typically be equal to (or derived from) the
Note: This is an optional operation. It is perfectly valid to
return | |
| getScope | back to summary |
|---|---|
| protected int getScope() Implements abstract org. Doc from org. Template method that determines the actual target scope.
| |
| remove | back to summary |
|---|---|
| public Object remove(String name) Overrides org. Implements org. Doc from org. Remove the object with the given Returns Note that an implementation should also remove a registered destruction callback for the specified object, if any. It does, however, not need to execute a registered destruction callback in this case, since the object will be destroyed by the caller (if appropriate). Note: This is an optional operation. Implementations may throw
| |