All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lightstreamer.kotlin.socket.message.LightstreamerSubscriptionMessage.kt Maven / Gradle / Ivy

The newest version!
package com.lightstreamer.kotlin.socket.message

/**
 * Subscription event
 */
public sealed class LightstreamerSubscriptionMessage {

    public data class ClearSnapshot(val itemId: Int) : LightstreamerSubscriptionMessage()

    public data class Configuration(val maxFrequency: Float?, val filtered: Boolean) :
        LightstreamerSubscriptionMessage()

    public data class EndOfSnapshot(val itemId: Int) : LightstreamerSubscriptionMessage()

    public data class Overflow(val item: Int, val overflowSize: Int) : LightstreamerSubscriptionMessage()

    public class Update(private val updateMap: Map) :
        LightstreamerSubscriptionMessage(), Map by updateMap {
        override fun hashCode(): Int = updateMap.hashCode()
        override fun equals(other: Any?): Boolean = this === other || (other is Update) && updateMap == other.updateMap
        override fun toString(): String = "Update$updateMap"
    }

    public data class SubscriptionOk(
        val itemCount: UShort,
        val fieldCount: UShort,
        val keyFieldPos: UShort? = null,
        val commandFieldPos: UShort? = null
    ) : LightstreamerSubscriptionMessage()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy