Connection Information
Topic Name |
finesse.info.connection |
Topic Type |
Gadgets subscribe to this topic. |
Gadgets subscribe to the finesse.info.connection topic to receive status information about the XMPP connection, which is automatically established by the Finesse Desktop or a Finesse Desktop gadget (within a non-Finesse container). Connection status information can be used to determine the state of the connection so that a gadget can act appropriately. Additionally, a resource ID is provided in the published data to allow the gadget to construct a subscribe request to the Finesse Web Services. Connection information is published every time there is a connection state change.
The published data is a JavaScript object with the following properties:
The status parameter describes the XMPP connection status. It can have any one of the following values:
-
connected
-
connecting
-
disconnected
-
disconnecting
-
reconnecting
-
unloading
Note | A XMPP connection status of "unloading" indicates that an action in the browser (such as refreshing the browser or clicking the back button) caused the XMPP connection to initiate the unloading process. |
The resourceID parameter is a unique identifier for the XMPP connection. Although the resourceID parameter is provided with every connection status change, the ID is not available until after a XMPP connection has been successfully established. It is possible that the XMPP connection reconnects with a different resourceID.
A situation can occur where a gadget is loaded after the Finesse Desktop or gadget has already published connection information. In this case, have the gadget publish a request to a Finesse request topic, which forces the Finesse Desktop to publish the connection information again. For more information, see Finesse Requests.