Class SessionFlashMapManager
java.lang.Object
org.springframework.web.servlet.support.AbstractFlashMapManager
org.springframework.web.servlet.support.SessionFlashMapManager
- All Implemented Interfaces:
FlashMapManager
Store and retrieve
FlashMap
instances to and from the HTTP session.- Since:
- 3.1.1
- Author:
- Rossen Stoyanchev, Juergen Hoeller
-
Field Summary
Fields inherited from class org.springframework.web.servlet.support.AbstractFlashMapManager
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
getFlashMapsMutex
(HttpServletRequest request) Exposes the best available session mutex.retrieveFlashMaps
(HttpServletRequest request) Retrieves saved FlashMap instances from the HTTP session, if any.protected void
updateFlashMaps
(List<FlashMap> flashMaps, HttpServletRequest request, HttpServletResponse response) Saves the given FlashMap instances in the HTTP session.Methods inherited from class org.springframework.web.servlet.support.AbstractFlashMapManager
getFlashMapTimeout, getUrlPathHelper, isFlashMapForRequest, retrieveAndUpdate, saveOutputFlashMap, setFlashMapTimeout, setUrlPathHelper
-
Constructor Details
-
SessionFlashMapManager
public SessionFlashMapManager()
-
-
Method Details
-
retrieveFlashMaps
Retrieves saved FlashMap instances from the HTTP session, if any.- Specified by:
retrieveFlashMaps
in classAbstractFlashMapManager
- Parameters:
request
- the current request- Returns:
- a List with FlashMap instances, or
null
if none found
-
updateFlashMaps
protected void updateFlashMaps(List<FlashMap> flashMaps, HttpServletRequest request, HttpServletResponse response) Saves the given FlashMap instances in the HTTP session.- Specified by:
updateFlashMaps
in classAbstractFlashMapManager
- Parameters:
flashMaps
- a (potentially empty) list of FlashMap instances to saverequest
- the current requestresponse
- the current response
-
getFlashMapsMutex
Exposes the best available session mutex.- Overrides:
getFlashMapsMutex
in classAbstractFlashMapManager
- Parameters:
request
- the current request- Returns:
- the mutex to use (may be
null
if none applicable) - See Also:
-