Class HttpSessionRequestCache
java.lang.Object
com.codename1.backend.security.HttpSessionRequestCache
- All Implemented Interfaces:
RequestCache
Remembers the address in the HTTP session, under SAVED_REQUEST.
A request is worth returning to when it is a GET a person's browser made:
not one a script sent (X-Requested-With: XMLHttpRequest), not one that asks
for JSON only, and not a request for the site's icon.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe session attribute the address is stored under. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRequest(HttpServer.Request request) The remembered address -- a path, with its query -- or null.voidremoveRequest(HttpServer.Request request) Forgets it.voidsaveRequest(HttpServer.Request request) Remembersrequest's address, when it is one worth returning to.voidsetCreateSessionAllowed(boolean createSessionAllowed) Whether remembering may start a session; true unless changed.
-
Field Details
-
SAVED_REQUEST
The session attribute the address is stored under.- See Also:
-
-
Constructor Details
-
HttpSessionRequestCache
public HttpSessionRequestCache()
-
-
Method Details
-
setCreateSessionAllowed
public void setCreateSessionAllowed(boolean createSessionAllowed) Whether remembering may start a session; true unless changed. -
saveRequest
Description copied from interface:RequestCacheRemembersrequest's address, when it is one worth returning to.- Specified by:
saveRequestin interfaceRequestCache
-
getRequest
Description copied from interface:RequestCacheThe remembered address -- a path, with its query -- or null.- Specified by:
getRequestin interfaceRequestCache
-
removeRequest
Description copied from interface:RequestCacheForgets it.- Specified by:
removeRequestin interfaceRequestCache
-