android-components / mozilla.components.feature.session / SessionUseCases / <init>


SessionUseCases(sessionManager: SessionManager, onNoSession: (String) -> Session = { url -> Session(url).apply { sessionManager.add(this) } })

Contains use cases related to the session feature.


sessionManager - the application’s SessionManager.

onNoSession - When invoking a use case that requires a (selected) Session and when no Session is available this (optional) lambda will be invoked to create a Session. The default implementation creates a Session and adds it to the SessionManager.