DatasyncState

data class DatasyncState(isReachable: Boolean, connectionState: DatasyncState.ConnectionState, authenticationState: AuthenticationEvent.AuthenticationState)

Represents some state indicators about a DatasyncService instance.

Such a state must be read using the DatasyncManager.subscribeToStateChange method on any DatasyncManager instance of the targeted DatasyncService.

Constructors

DatasyncState
Link copied to clipboard
fun DatasyncState(isReachable: Boolean, connectionState: DatasyncState.ConnectionState, authenticationState: AuthenticationEvent.AuthenticationState)

Types

ConnectionState
Link copied to clipboard
sealed class ConnectionState
Represents the state of the real-time connection (web-socket) of a DatasyncService to the Webcom back end.

Functions

isAuthenticated
Link copied to clipboard
fun isAuthenticated(): Boolean
Indicates whether a user is actually authenticated on the real time connection to the Webcom back end.
isConnected
Link copied to clipboard
fun isConnected(): Boolean
Indicates whether the real time connection to the Webcom back end is established.

Properties

authenticationDetails
Link copied to clipboard
val authenticationDetails: AuthenticationDetails?
All the properties that describe the authenticated user if isAuthenticated returns true or null otherwise (no user is authenticated).
authenticationState
Link copied to clipboard
State of the user authentication maintained on the real time connection (web-socket) of the DatasyncService to the Webcom back end.
connectionState
Link copied to clipboard
val connectionState: DatasyncState.ConnectionState
State of the real time connection (web-socket) of the DatasyncService to the Webcom back end.
isReachable
Link copied to clipboard
val isReachable: Boolean
true if and only if the running device has network connectivity