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

com.pubnub.api.java.v2.entities.UserMetadata.kt Maven / Gradle / Ivy

Go to download

PubNub is a cross-platform client-to-client (1:1 and 1:many) push service in the cloud, capable of broadcasting real-time messages to millions of web and mobile clients simultaneously, in less than a quarter second!

There is a newer version: 10.2.0
Show newest version
package com.pubnub.api.java.v2.entities

import com.pubnub.api.java.v2.subscriptions.Subscription
import com.pubnub.api.v2.entities.Subscribable
import com.pubnub.api.v2.subscriptions.SubscriptionOptions

/**
 * A representation of a PubNub entity for tracking user metadata changes.
 *
 * You can get a [Subscription] to listen for metadata events through [Subscribable.subscription].
 *
 * Use the [com.pubnub.api.java.PubNub.userMetadata] factory method to create instances of this interface.
 */
interface UserMetadata : com.pubnub.api.java.v2.entities.Subscribable {
    /**
     * The id for this user metadata object.
     *
     * See more in the [documentation](https://www.pubnub.com/docs/general/metadata/users-metadata)
     */
    val id: String

    /**
     * Returns a [Subscription] that can be used to subscribe to this user metadata.
     *
     * [com.pubnub.api.v2.subscriptions.SubscriptionOptions.filter] can be used to filter events delivered to the subscription.
     *
     * @param options optional [SubscriptionOptions].
     * @return an inactive [Subscription] to this user metadata. You must call [Subscription.subscribe] to start receiving events.
     */
    override fun subscription(options: SubscriptionOptions): Subscription

    /**
     * Returns a [Subscription] that can be used to subscribe to this channel.
     *
     * The returned [Subscription] is initially inactive. You must call [Subscription.subscribe] on it
     * to start receiving events.
     *
     * @return An inactive [Subscription] to this channel.
     */
    fun subscription(): Subscription
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy