interface SessionStorage
(source)
Storage component for browser and engine sessions.
abstract fun clear(engine: Engine): Unit
Erases persisted SessionsSnapshot (if present) for a given Engine. |
|
abstract fun persist(engine: Engine, snapshot: SessionsSnapshot): Boolean
Persists the provided SessionsSnapshot for a given Engine. SessionsSnapshot may be obtained using SessionManager.createSnapshot. Throws if snapshot is empty or otherwise incoherent. |
|
abstract fun read(engine: Engine): SessionsSnapshot?
Returns the latest persisted sessions snapshot that may be used to read sessions. Resulting SessionsSnapshot may be restored via SessionManager.restore. |
|
abstract fun start(sessionManager: SessionManager): Unit
Starts persisting the state frequently and automatically. |
|
abstract fun stop(): Unit
Stops persisting the state automatically. |
class DefaultSessionStorage : SessionStorage
Default implementation of SessionStorage which persists browser and engine session states to a JSON file. |