Channel

interface Channel : Subscribable

A representation of a PubNub channel identified by its name.

You can get a Subscription to this channel through Subscribable.subscription.

Use the com.pubnub.api.java.PubNub.channel factory method to create instances of this interface.

Properties

Link copied to clipboard
abstract val name: String

The name of this channel. Supports wildcards by ending it with ".*"

Functions

Link copied to clipboard
abstract fun fire(message: Any): PublishBuilder

Send a message to PubNub Functions Event Handlers.

Link copied to clipboard
abstract fun publish(message: Any): PublishBuilder

Send a message to all subscribers of the channel.

Link copied to clipboard
abstract fun signal(message: Any): SignalBuilder

Send a signal to all subscribers of a channel.

Link copied to clipboard
abstract fun subscription(): Subscription
abstract override fun subscription(options: SubscriptionOptions): Subscription

Returns a Subscription that can be used to subscribe to this channel.