|
spring-webmvc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.web.servlet.support.AbstractFlashMapManager
public abstract class AbstractFlashMapManager
A base class for FlashMapManager
implementations.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
AbstractFlashMapManager()
|
Method Summary | |
---|---|
int |
getFlashMapTimeout()
Return the amount of time in seconds before a FlashMap expires. |
org.springframework.web.util.UrlPathHelper |
getUrlPathHelper()
Return the UrlPathHelper implementation to use. |
protected boolean |
isFlashMapForRequest(FlashMap flashMap,
javax.servlet.http.HttpServletRequest request)
Whether the given FlashMap matches the current request. |
FlashMap |
retrieveAndUpdate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Find a FlashMap saved by a previous request that matches to the current request, remove it from underlying storage, and also remove other expired FlashMap instances. |
protected abstract java.util.List<FlashMap> |
retrieveFlashMaps(javax.servlet.http.HttpServletRequest request)
Retrieve saved FlashMap instances from underlying storage. |
void |
saveOutputFlashMap(FlashMap flashMap,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Save the given FlashMap, in some underlying storage and set the start of its expiration period. |
void |
setFlashMapTimeout(int flashMapTimeout)
Set the amount of time in seconds after a FlashMap is saved
(at request completion) and before it expires. |
void |
setUrlPathHelper(org.springframework.web.util.UrlPathHelper urlPathHelper)
Set the UrlPathHelper to use to match FlashMap instances to requests. |
protected abstract void |
updateFlashMaps(java.util.List<FlashMap> flashMaps,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Update the FlashMap instances in some underlying storage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
public AbstractFlashMapManager()
Method Detail |
---|
public void setFlashMapTimeout(int flashMapTimeout)
FlashMap
is saved
(at request completion) and before it expires.
The default value is 180 seconds.
public int getFlashMapTimeout()
public void setUrlPathHelper(org.springframework.web.util.UrlPathHelper urlPathHelper)
public org.springframework.web.util.UrlPathHelper getUrlPathHelper()
public final FlashMap retrieveAndUpdate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
FlashMapManager
This method is invoked in the beginning of every request in contrast
to FlashMapManager.saveOutputFlashMap(org.springframework.web.servlet.FlashMap, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
, which is invoked only when there are
flash attributes to be saved - i.e. before a redirect.
retrieveAndUpdate
in interface FlashMapManager
request
- the current requestresponse
- the current response
null
protected abstract java.util.List<FlashMap> retrieveFlashMaps(javax.servlet.http.HttpServletRequest request)
request
- the current request
null
protected boolean isFlashMapForRequest(FlashMap flashMap, javax.servlet.http.HttpServletRequest request)
public final void saveOutputFlashMap(FlashMap flashMap, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
FlashMapManager
Note: Invoke this method prior to a redirect in order to allow saving the FlashMap in the HTTP session or in a response cookie before the response is committed.
saveOutputFlashMap
in interface FlashMapManager
flashMap
- the FlashMap to saverequest
- the current requestresponse
- the current responseprotected abstract void updateFlashMaps(java.util.List<FlashMap> flashMaps, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
flashMaps
- a non-empty list of FlashMap instances to saverequest
- the current requestresponse
- the current response
|
spring-webmvc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |