SyncStream

interface SyncStream

Interface for Sync Pub-sub messaging primitive.

Message Stream is a Sync primitive for real-time pub-sub messaging. Stream Messages are not persisted, they exist only in transit, and will be dropped if (due to congestion or network anomalies) they cannot be delivered promptly.

You can publish messages and listen for incoming messages.

To obtain an instance of a SyncStream use openStream.

Types

Link copied to clipboard
interface Message
Single message in a SyncStream.

Functions

Link copied to clipboard
abstract fun getSid(): String
An immutable system-assigned identifier of this Message SyncStream.
Link copied to clipboard
abstract fun getUniqueName(): String
An optional unique name for this stream, assigned at creation time.
Link copied to clipboard
abstract fun publishMessage(data: JSONObject, listener: SuccessListener<String>)
Publish a new message to this message stream.
Link copied to clipboard
abstract fun removeStream(listener: SuccessListener<Void>)
Remove the stream from the system, deleting it.
Link copied to clipboard
abstract fun setTtl(ttl: Int, listener: SuccessListener<Void>)
Set time to live for stream object in seconds.

Properties

Link copied to clipboard
Time to live for a stream, specifying no expiry.