Top Description Fields Constructors Methods
org.springframework.web.servlet.support

public Class SessionFlashMapManager

extends AbstractFlashMapManager
Class Inheritance
Imports
java.util.List, jakarta.servlet.http.HttpServletRequest, .HttpServletResponse, .HttpSession, org.springframework.lang.Nullable, org.springframework.web.servlet.FlashMap, org.springframework.web.util.WebUtils

Store and retrieve FlashMap instances to and from the HTTP session.
Authors
Rossen Stoyanchev, Juergen Hoeller
Since
3.1.1

Field Summary

Modifier and TypeField and Description
private static final String
Inherited from org.springframework.web.servlet.support.AbstractFlashMapManager:
logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Object
getFlashMapsMutex(HttpServletRequest
the current request
request
)

Overrides org.springframework.web.servlet.support.AbstractFlashMapManager.getFlashMapsMutex.

Exposes the best available session mutex.

protected List<FlashMap>
retrieveFlashMaps(HttpServletRequest
the current request
request
)

Implements abstract org.springframework.web.servlet.support.AbstractFlashMapManager.retrieveFlashMaps.

Retrieves saved FlashMap instances from the HTTP session, if any.

protected void
updateFlashMaps(List<FlashMap>
a (potentially empty) list of FlashMap instances to save
flashMaps
,
HttpServletRequest
the current request
request
,
HttpServletResponse
the current response
response
)

Implements abstract org.springframework.web.servlet.support.AbstractFlashMapManager.updateFlashMaps.

Saves the given FlashMap instances in the HTTP session.

Inherited from org.springframework.web.servlet.support.AbstractFlashMapManager:
getFlashMapTimeoutgetUrlPathHelperisFlashMapForRequestretrieveAndUpdatesaveOutputFlashMapsetFlashMapTimeoutsetUrlPathHelper

Field Detail

FLASH_MAPS_SESSION_ATTRIBUTEback to summary
private static final String FLASH_MAPS_SESSION_ATTRIBUTE

Constructor Detail

SessionFlashMapManagerback to summary
public SessionFlashMapManager()

Method Detail

getFlashMapsMutexback to summary
protected Object getFlashMapsMutex(HttpServletRequest request)

Overrides org.springframework.web.servlet.support.AbstractFlashMapManager.getFlashMapsMutex.

Exposes the best available session mutex.

Parameters
request:HttpServletRequest

Doc from org.springframework.web.servlet.support.AbstractFlashMapManager.getFlashMapsMutex.

the current request

Returns:Object

Doc from org.springframework.web.servlet.support.AbstractFlashMapManager.getFlashMapsMutex.

the mutex to use (may be null if none applicable)

Annotations
@Override
See Also
org.springframework.web.util.WebUtils#getSessionMutex, org.springframework.web.util.HttpSessionMutexListener
retrieveFlashMapsback to summary
protected List<FlashMap> retrieveFlashMaps(HttpServletRequest request)

Implements abstract org.springframework.web.servlet.support.AbstractFlashMapManager.retrieveFlashMaps.

Retrieves saved FlashMap instances from the HTTP session, if any.

Parameters
request:HttpServletRequest

Doc from org.springframework.web.servlet.support.AbstractFlashMapManager.retrieveFlashMaps.

the current request

Returns:List<FlashMap>

Doc from org.springframework.web.servlet.support.AbstractFlashMapManager.retrieveFlashMaps.

a List with FlashMap instances, or null if none found

Annotations
@Override
@SuppressWarnings:unchecked
@Nullable
updateFlashMapsback to summary
protected void updateFlashMaps(List<FlashMap> flashMaps, HttpServletRequest request, HttpServletResponse response)

Implements abstract org.springframework.web.servlet.support.AbstractFlashMapManager.updateFlashMaps.

Saves the given FlashMap instances in the HTTP session.

Parameters
flashMaps:List<FlashMap>

Doc from org.springframework.web.servlet.support.AbstractFlashMapManager.updateFlashMaps.

a (potentially empty) list of FlashMap instances to save

request:HttpServletRequest

Doc from org.springframework.web.servlet.support.AbstractFlashMapManager.updateFlashMaps.

the current request

response:HttpServletResponse

Doc from org.springframework.web.servlet.support.AbstractFlashMapManager.updateFlashMaps.

the current response

Annotations
@Override