Kony Listener API

The Kony Listener API enables application developers to create, subscribe, and broadcast events between components. By using the Kony Listener APIs, developers can enable communication and pass data between components such as Quantum Component-Angular Component, Angular Component-Angular Component, or Quantum Component-Quantum Component.

The Kony Listener API uses the kony.listener Namespace and has the following API elements.

Function Description
kony.listener.broadcast Broadcasts the data to the specified event.
kony.listener.create Creates an event.
kony.listener.destroy Destroys the specified event.
kony.listener.subscribe Subscribe to the specified event.
kony.listener.unsubscribe Unsubscribe from the specified subscriptions.
 

To create a new event, use the kony.listener.create API. Use the kony.listener.subscribe API to subscribe to a specific event of a component. By using the kony.listener.broadcast API, you can broadcast an event to other Components or Forms. To stop receiving broadcasts from subscribed events, use the kony.listener.unsubscribe API. Use the kony.listener.destroy API to unsubscribe from all the subscriptions of the specific event (if there are any).