WebcomConfiguration

data class WebcomConfiguration @JvmOverloads constructor(    val identifier: String,     val platform: URL? = null,     val offlineCache: String? = null,     val startOnline: Boolean = true,     val websocketProtocol: WebcomConfiguration.WebsocketProtocol = defaultWebsocketProtocol,     val pingDelayMs: Int? = null,     val pongDelayMs: Int? = null)

Represents the settings of a WebcomApplication instance.

WebcomConfiguration instances are generally built using the fromProperties and fromAsset methods.

Constructors

Link copied to clipboard
fun WebcomConfiguration(    identifier: String,     platform: URL? = null,     offlineCache: String? = null,     startOnline: Boolean = true,     websocketProtocol: WebcomConfiguration.WebsocketProtocol = defaultWebsocketProtocol,     pingDelayMs: Int? = null,     pongDelayMs: Int? = null)

Builds a WebcomConfiguration instance with specific settings.

Types

Link copied to clipboard
object Companion

Provides with a set of methods to easily build WebcomConfiguration instances.

Link copied to clipboard

Available versions of the websocket protocol between the Webcom SDK client and the Webcom back end.

Functions

Link copied to clipboard
fun withOfflineCache(offlineCache: String): WebcomConfiguration

Creates a copy of this WebcomConfiguration with the WebcomConfiguration.offlineCache property set to offlineCache.

Link copied to clipboard
fun withStartOnline(startOnline: Boolean): WebcomConfiguration

Creates a copy of this WebcomConfiguration with the WebcomConfiguration.startOnline property set to startOnline.

Properties

Link copied to clipboard
val identifier: String

The identifier of the Webcom application. Mandatory

Link copied to clipboard
val offlineCache: String? = null

The offline data to restore into the local cache when starting the Webcom application. The specified data must have been previously retrieved using DatasyncService.offlineCache.

Link copied to clipboard
val pingDelayMs: Int? = null

The delay (expressed in milliseconds) between ping requests when there is no activity on the websocket. If not set, a default value is used.

Link copied to clipboard
val platform: URL? = null

The URL of the Webcom back end to use. Optional: if not set, the production back end is used by default.

Link copied to clipboard
val pongDelayMs: Int? = null

The maximum delay (expressed in milliseconds) for the back end to respond a ping request on the websocket. If not set, a default value is used.

Link copied to clipboard
val startOnline: Boolean = true

Indicates whether the DatasyncService will open the websocket to the Webcom back end at start up.

Link copied to clipboard

The version of the websocket protocol to use to communicate with the Webcom back end. Advanced usage: prefer using the default value.