EventEmitter

interface EventEmitter

Interface implemented by objects that are the source of real time events from the PubNub network.

Inheritors

Properties

Link copied to clipboard
open var onFile: (PNFileEventResult) -> Unit?

A nullable property to set a function or lambda for responding to file events. This function is invoked whenever a new file event is received, providing a convenient way to process or react to file events.

Link copied to clipboard

A nullable property that can be set to a function (or lambda expression) to handle incoming message events. This function is invoked whenever a new message is received, providing a convenient way to process or react to messages.

Link copied to clipboard

A nullable property that allows setting a function or lambda to react to message action events. This function is invoked whenever a new message action is received, providing a convenient way to process or react to message actions.

Link copied to clipboard

A nullable property for assigning a function or lambda to handle object events. This function is triggered with each new object event, providing a mechanism to manage object-related updates.

Link copied to clipboard

A nullable property designed to set a function or lambda expression for handling incoming presence events. This function is called whenever a new presence event occurs, offering an efficient method for tracking presence updates.

Link copied to clipboard
open var onSignal: (PNSignalResult) -> Unit?

A nullable property for assigning a function or lambda expression to handle incoming signal events. This function is called whenever a new signal is received, providing a convenient way to process or react to signals.

Functions

Link copied to clipboard
abstract fun addListener(listener: EventListener)

Add a listener.

Link copied to clipboard
abstract fun removeAllListeners()

Removes all listeners.

Link copied to clipboard
abstract fun removeListener(listener: Listener)

Remove a listener.