Subscription Support
Finesse JavaScript objects support subscription to the XMPP events. These events are the notifications generated by the Openfire server and pushed to the desktop as XMPP events. Any JavaScript object that supports subscription is automatically hooked up for listening to XMPP events when it is initialized.
Note | This subscription is not a Notification subscription but a desktop level subscription to receive the events generated by the OpenAjax hub. |
For example, the User API supports the subscription model and the User functions as stated in the below example.
These handlers can handle the REST response and the XMPP events. For example, when the state change for a signed-in User is triggered by another agent (that is, Supervisor), the client or desktop receives a User update XMPP event on the node "/finesse/api/User/1001001".
Payload with Updated User State Details
The XMPP events are handled, and the same onChange
handler provided by you is invoked by the Finesse JavaScript library.