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

public interface RequestCache

Known subtypesHttpSessionRequestCache, NullRequestCache

Remembers where an anonymous request was going, so that signing in can send the user there instead of to a fixed page.

Only the address is kept, and only of a GET: a request with a body is not replayed after sign-in.

Methods

public abstract void saveRequest(HttpServer.Request request)Remembers request’s address, when it is one worth returning to.
public abstract String getRequest(HttpServer.Request request)The remembered address – a path, with its query – or null.
public abstract void removeRequest(HttpServer.Request request)Forgets it.

Method details

saveRequest

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

getRequest

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

removeRequest

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