SessionManagerInterface

interface SessionManagerInterface

Interface to manage sessions.

Types

Link copied to clipboard
interface Listener

The listener for session (de)activation

Link copied to clipboard
interface Requester

the marker interface which request (de)activation for Session

Link copied to clipboard
data class Session(val sessionId: String, val playServiceId: String)

the class for Session

Functions

Link copied to clipboard
abstract fun activate(key: String, requester: SessionManagerInterface.Requester)

request activate a session having key.

Link copied to clipboard
abstract fun addListener(listener: SessionManagerInterface.Listener)
Link copied to clipboard
abstract fun deactivate(key: String, requester: SessionManagerInterface.Requester)

request deactivate a session which is key.

Link copied to clipboard
abstract fun getActiveSessions(): Map<String, SessionManagerInterface.Session>

Get active sessions.

Link copied to clipboard
abstract fun removeListener(listener: SessionManagerInterface.Listener)
Link copied to clipboard
abstract fun set(key: String, session: SessionManagerInterface.Session)

Set a session with given key. But, the session will not activated until activate called with Requester.