Session

class Session(adapter: SessionPort)

Provides session information.

Constructors

Link copied to clipboard
fun Session(adapter: SessionPort)

Functions

Link copied to clipboard
fun get(name: String): Any?

Returns the attribute object bound to this session by the given name.

Link copied to clipboard
fun invalidate()

Invalidates this session then unbinds any objects bound to it.

Link copied to clipboard
fun isNew(): Boolean

Returns true if the client does not yet know about the session or if the client chooses not to join the session.

Link copied to clipboard
fun remove(name: String)

Removes the bound object from the session attribute with the specified name.

Link copied to clipboard
fun removeAttribute(name: String)

Removes the bound object from the session attribute with the specified name.

Link copied to clipboard
fun set(name: String, value: Any)

Sets a attribute object to this session with the given name.

Properties

Link copied to clipboard
val adapter: SessionPort
Link copied to clipboard
val attributes: Map<String, Any?>

Map of attribute objects bound to the session.

Link copied to clipboard
val creationTime: Long?

The time when this session was created.

Link copied to clipboard
val id: String?

A string containing the unique identifier assigned to this session (Cookie).

Link copied to clipboard
val lastAccessedTime: Long?

The last time the client sent a request associated with this session.

Link copied to clipboard
var maxInactiveInterval: Int?

The maximum time interval in seconds between client accesses after which the session will be invalidated.