Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public final class HttpSessionRequestCache

  1. Object
  2. HttpSessionRequestCache

ImplementsRequestCache

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.

Fields

public static final String SAVED_REQUEST = "SPRING_SECURITY_SAVED_REQUEST"The session attribute the address is stored under.

Constructors

public HttpSessionRequestCache()

Methods

public void setCreateSessionAllowed(boolean createSessionAllowed)Whether remembering may start a session; true unless changed.
public void saveRequest(HttpServer.Request request)Remembers request’s address, when it is one worth returning to.
public String getRequest(HttpServer.Request request)The remembered address – a path, with its query – or null.
public void removeRequest(HttpServer.Request request)Forgets it.

Inherited methods

Field details

SAVED_REQUEST

public static final String SAVED_REQUEST = "SPRING_SECURITY_SAVED_REQUEST"
The session attribute the address is stored under.

Constructor details

HttpSessionRequestCache

public HttpSessionRequestCache()

Method details

setCreateSessionAllowed

public void setCreateSessionAllowed(boolean createSessionAllowed)
Whether remembering may start a session; true unless changed.

saveRequest

public void saveRequest(HttpServer.Request request)
Remembers request’s address, when it is one worth returning to.

getRequest

public String getRequest(HttpServer.Request request)
The remembered address – a path, with its query – or null.

removeRequest

public void removeRequest(HttpServer.Request request)
Forgets it.