Event

class Event<T : Any>(val type: String, val channel: String, val connectionId: Long?, val subscriptions: List<String>, val timestamp: Long?, val data: T)

Represents a generic event caught by PrivMX Endpoint.

Parameters

T

The type of data associated with the event

Constructors

Link copied to clipboard
constructor(type: String, channel: String, connectionId: Long?, data: T)
constructor(type: String, channel: String, connectionId: Long?, subscriptions: List<String>, timestamp: Long?, data: T)

Properties

Link copied to clipboard

The event channel

Link copied to clipboard

ID of connection for this event

Link copied to clipboard
val data: T

The data payload associated with the event

Link copied to clipboard

List of subscription IDs to which the event is related

Link copied to clipboard

Timestamp of the event. Represents the point in time when event occurred. For events received from Bridge, this value comes from Bridge. For events generated in the library, this is a local timestamp.

Link copied to clipboard

Type of the event