Class: PubSub

PubSub

new PubSub()

Source:

Methods

publish(eventName, message)

Publishes a blinx event

Parameters:
Name Type Description
eventName string
message string
Source:

subscribe(subscription, eventNameopt)

Subscribes to the blinx event

Parameters:
Name Type Attributes Default Description
subscription Object

the subscription object

eventName <optional>
subscription.eventName
Source:

unsubscribe(subscriber, eventName, callback)

unsubscribes a blinx event

Parameters:
Name Type Description
subscriber Object

the reference of the module which had subscribed the event earlier

eventName string
callback function

the callback method to be unsubscribed

Source: