interface CurrentSession
Represents a container for all session instances
abstract fun clear(name: String): Unit
Clear session instance for name |
|
abstract fun findName(type: KClass<*>): String
Find session name for the specified type or fail if not found |
|
abstract fun get(name: String): Any?
Get session instance for name |
|
abstract fun set(name: String, value: Any?): Unit
Set new session instance with name |
fun <T> CurrentSession.clear(): Unit
Clear session instance with type T |
|
fun <T> CurrentSession.get(): T?
Get session instance with type T |
|
fun <T> CurrentSession.getOrSet(name: String = findName(T::class), generator: () -> T): T
Get or generate a new session instance using generator with type T (or name if specified) |
|
fun <T> CurrentSession.set(value: T?): Unit
Set session instance with type T |