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

public enum SessionCreationPolicy

  1. Object
  2. Enum<SessionCreationPolicy>
  3. SessionCreationPolicy

ImplementsComparable<SessionCreationPolicy>

Whether a chain may use the HTTP session.

Enum constants

ALWAYSEvery request under the chain gets a session.
NEVERThe chain never starts a session and uses one that is already there.
IF_REQUIREDA session starts when the chain needs one: at sign-in, or to remember where an anonymous request was going.
STATELESSThe chain neither starts nor reads a session: each request carries its own credentials.

Methods

public static SessionCreationPolicy[] values()
public static SessionCreationPolicy valueOf(String name)

Inherited methods

Enum constant details

ALWAYS

ALWAYS
Every request under the chain gets a session.

NEVER

NEVER
The chain never starts a session and uses one that is already there.

IF_REQUIRED

IF_REQUIRED
A session starts when the chain needs one: at sign-in, or to remember where an anonymous request was going. The default.

STATELESS

STATELESS
The chain neither starts nor reads a session: each request carries its own credentials.

Method details

values

public static SessionCreationPolicy[] values()

valueOf

public static SessionCreationPolicy valueOf(String name)