DatasyncState

data class DatasyncState : DatasyncEvent, Notification.DataNotification<DatasyncState>

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.

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

appId
Link copied to clipboard
open override val appId: String

Identifier of the WebcomApplication this Notification relates to.

application
Link copied to clipboard
val application: WebcomApplication

The WebcomApplication instance this DatasyncState relates to.

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
val authenticationState: AuthenticationState

State of the user authentication maintained on the real time connection (web-socket) of the DatasyncService to the Webcom back end. If the connection is in the ConnectionState.Disconnected state, this indicates the authentication state that will be restored when the connection will be re-established.

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.

data
Link copied to clipboard
open override val data: DatasyncState

The event conveyed by this DataNotification.

isReachable
Link copied to clipboard
val isReachable: Boolean

true if and only if the running device has network connectivity.

path
Link copied to clipboard
open override val path: String

Path of the data this Notification relates to, or "" if it doesn't relate to any data node.