Cisco AJAX XMPP Library Events
Web 2.0 library for XMPP-based Instant Messaging, Availability and Roster Management
Event Categories
Core Events
Name | Data Details | Description |
---|---|---|
chatSessionOpened |
{// the created session chatSession: jabberwerx.ChatSession, // <true> if created via openSession userCreated: Boolean } |
Triggered when a chat session is opened. The userCreated flag is <true> if this session is created by the user through openSession(). |
chatSessionClosed |
Triggered when a chat session is closed. |
Name | Data Details | Description |
---|---|---|
beforeChatSent |
Triggered before the chat message is sent. This event allows callbacks to modify the stanza before delivery. | |
chatSent |
Triggered after the chat message is sent. | |
chatReceived |
Triggered when a chat message is received. The message should have a <body/> and may contain an <error/> . |
|
threadUpdated |
N/A | Triggered when the thread ID for a chat session is changed. The thread is new thread ID. |
chatStateChanged |
{// JID of the entity changing state jid: jabberwerx.JID, // The new chat state state: String } |
Triggered when the chat state changes. jid is <null> if the current user's state changes. Otherwise, it is the JID of the entity whose state changed. The state is the new chat state and is one of the following:
|
lockedResourceChanged |
Triggered when the resource this ChatSession is locked to changes. Thejid is the new full JID of the entity if the resource is different, or the bare JID if the previous resource is determined to be "stale". |
Name | Data Details | Description |
---|---|---|
clientStatusChanged |
{// previous status code prev: Number, // next status code next: Number, // describes the error, if any error: Error object } |
Triggered when a client's status changes. The status codes are one of the following:
|
beforeIqSent |
Triggered before an <iq/> stanza is sent. This event allows callbacks to modify the stanza before delivery. |
|
iqSent |
Triggered after an <iq/> stanza is sent. |
|
beforeIqReceived |
Triggered when an stanza is received, before mainline processing. For more information see Notes. | |
iqReceived |
Triggered when an <iq/> stanza is received, during mainline processing. For more information see Notes. |
|
afterIqReceived |
Triggered when an <iq/> stanza is received, after mainline processing. For more information see Notes. |
|
beforeMessageSent |
Triggered before a <message/> stanza is sent. This event allows callbacks to modify the stanza before delivery. |
|
messageSent |
Triggered after a <message/> stanza is sent. |
|
beforeMessageReceived |
Triggered when a <message/> stanza is received, before mainline processing. For more information see Notes. |
|
messageReceived |
Triggered when a <message/> stanza is received, during mainline processing. For more information see Notes. |
|
afterMessageReceived |
Triggered when a <message/> stanza is received, after mainline processing. For more information see Notes. |
|
beforePresenceSent |
Triggered before a <presence/> stanza is sent. This event allows callbacks to modify the stanza before delivery. |
|
presenceSent |
Triggered after a <presence/> stanza is sent. |
|
beforePresenceReceived |
Triggered when a <presence/> stanza is received, before mainline processing. |
|
presenceReceived |
Triggered when a <presence/> stanza is received, during mainline processing. |
|
afterPresenceReceived |
Triggered when a <presence/> stanza is received, after mainline processing. |
|
reconnectCountdownStarted |
Number | Triggered when the auto reconnect starts its timer. The data is the number of seconds until the next reconnection attempt is made. |
reconnectCancelled |
N/A | Triggered when the reconnect logic is cancelled. |
clientConnected |
N/A | Triggered when the client has successfully connected to the server. |
clientDisconnected |
<error> |
Triggered when the client has successfully disconnected from the server. |
Notes
If any callback triggered for these events returns true, then the overall event is considered handled: subsequent events are not triggered, and any built-in processing (for example, sending feature-not-implemented for iq's of type 'get' or 'set') is not performed.
Name | Data Details | Description |
---|---|---|
primaryPresenceChanged |
{// the full JID of the new primary fullJid: jabberwerx.JID, // the <presence/> of the new primary presence: jabberwerx.Presence } |
Triggered when the primary presence or availability of an entity changed. If there is no primary (For example, all resources for an entity are offline), presence is <null> and fullJid is the bare JID of the entity. |
resourcePresenceChanged |
{// the triggering full JID fullJid: jabberwerx.JID, // the triggering <presence/> stanza presence: jabberwerx.Presence } |
Triggered whenever the presence or availability for an entity is changed. The presence is the <presence/> stanza that triggered the change, and may be an "unavailable" presence. |
Name | Data Details | Description |
---|---|---|
entityAdded |
Triggered when an entity is added to the source entitySet. | |
entityRemoved |
Triggered when an entity is removed from the source entitySet. | |
entityUpdated |
Triggered when an entity's information is updated. | |
batchUpdateStarted |
N/A | Triggered when a batch update to an entity set is started. Note: EntitySet events will fire normally during a batch. They can be suppressed by setting the jabberwerx.EntitySet.suppressBatchedEvents property to true . |
batchUpdateEnded |
[{// name of batched event event: String, // Data associated with the batched event data: Object }] |
Triggered when a batch update to the entity cache is ended. The event's data is an array of all EntitySet events that fired during the batch. |
jabberwerx.EntitySet Cache Events
NOTE: These events are provided by a number of different classes:
- [jabberwerx.ClientEntityCache](ajax-xmpp-library/symbols/jabberwerx.ClientEntityCache.html)
- [jabberwerx.MUCOccupantCache](ajax-xmpp-library/symbols/jabberwerx.MUCOccupantCache.html)
Name | Data Details | Description |
---|---|---|
entityCreated |
Triggered when an entity is created. | |
entityDestroyed |
Triggered when an entity is destroyed. | |
entityRenamed |
{// The renamed entity (the entity.jid // and entity.node already updated) entity: jabberwerx.Entity, // The old jid (if any) jid: jabberwerx.JID, // The old node (if any) node: String } |
Triggered when an entity is renamed. The jid and node properites are the previous value for entity . |
Name | Data Details | Description |
---|---|---|
rosterFetched |
N/A | Triggered when RosterController has finished fetching and populating roster. |
errorEncountered |
error: <error/> element |
An error occurred while trying to fetch the roster. The error element provides the additional details. |
subscriptionReceived |
{// the subscription presence stanza stanza: jabberwerx.Presence, // was the subscription handled automatically? handled: boolean } |
Triggered when a subscription request has been received. The event is triggered after automatic handling has been performed (auto accept, auto deny and so on). |
unsubscriptionReceived |
{// the unsubscribe presence stanza stanza: jabberwerx.Presence, // was the unsubscription handled automatically? handled: boolean } |
Triggered when a unsubscribe request has been received. The event is triggered after automatic handling has been performed (auto removal). |
Name | Data Details | Description |
---|---|---|
discoInitialized |
N/A | Triggered when DiscoController has finished initializing. |
Name | Data Details | Description |
---|---|---|
mucInviteReceived |
Triggered when a direct (XEP-0249) or mediated (XEP-0045) MUC Room invite is received. |
Name | Data Details | Description |
---|---|---|
roomCreated |
N/A | Triggered when a MUC room has been created but not yet configured. |
roomEntered |
N/A | Triggered when a MUC room is entered. |
roomExited |
N/A | Triggered when a MUC room is exited. |
beforeRoomBroadcastSent |
Triggered before a broadcast message is sent to a MUC room. This event allows callbacks to modify the stanza before delivery. | |
roomBroadcastSent |
Triggered after a broadcast message is sent. | |
roomBroadcastReceived |
Triggered when a broadcast message from a room is received. | |
beforeRoomSubjectChanging |
Triggered before a MUC room subject change request is sent. This event allows callbacks to modify the stanza before delivery. | |
roomSubjectChanging |
Triggered after a MUC room subject change request is sent. | |
roomSubjectChanged |
Triggered when a MUC room's subject has changed. | |
errorEncountered |
{// operation method name operation: String, // error details error: <error/> element, // true if error due to user aborting action aborted: Boolean } |
Triggered when an error is encountered requesting a MUC room operation. The error is the XMPP <error/> child element describing the failure. The operation may be one of the following:
|
Name | Data Details | Description |
---|---|---|
pubsubNodeCreated |
N/A | Triggered when a PubSubNode is created. |
pubsubNodeDeleted |
N/A | Triggered when a PubSubNode is deleted. |
pubsubItemsChanged |
{// operation that caused the change operation: String, // list of affected items items: PubSubItems[] } |
Triggered when one or more items within a PubSubNode are changed. The items is an array of changed PubSubItems. The operation is one of the following:
|
errorEncountered |
{// operation method name operation: String, // error details error: <error/> element } |
Triggered when an error is encountered requesting a PubSub node operation. The error is the XMPP <error/> child element describing the failure. The operation may be one of the following:
|
Name | Data Details | Description |
---|---|---|
errorEncountered |
{// operation method name operation: String, // error details error: <error/> element, // The privacy list targeted by the operation (if any) target: jabberwerx.PrivacyList } |
Triggered when an error is encountered requesting a privacy list operation. The error is the XMPP <error/> child element describing the failure. The operation may be one of the following:
target is the PrivacyList object the operation targeted. |
privacyListApplied |
{// name of applied list // or undefined if there is no active list name: String } |
Triggered when the active list for this resource is changed or removed. |
privacyListUpdated |
Triggered when a privacy list is created or changed. | |
privacyListRemoved |
Triggered when a privacy list has been deteled from the server. |
Name | Data Details | Description |
---|---|---|
subscriptionReceived |
{// <presence/> stanza of the request stanza: [jabberwerx.Presence](ajax-xmpp-library/symbols/jabberwerx.Presence.html), // <true> if the request has been // auto accepted handled: Boolean } |
Triggered when a subscription request is received. The <handled> flag indicates if the auto-accept logic has already accepted and handled the subscription request. |
unsubscriptionReceived |
{// <presence/> stanza of the request stanza: [jabberwerx.Presence](ajax-xmpp-library/symbols/jabberwerx.Presence.html), // <true> if the request has been // auto removed handled: Boolean } |
Triggered when an unsubscription request is received. The <handled> flag indicates if the auto-remove logic has already acknowledged and handled the unsubscription request. |
errorEncountered |
{operation: "fetch", error: <error/> element } |
Triggered when an error is encountered fetching the roster. The error is the XMPP <error/> child element describing the failure. |
jabberwerx.Stream Events
Name | Data Details | Description |
---|---|---|
streamClosed |
<stream:error/> element |
Triggered when a stream is closed. The data is present if the stream did not close gracefully. NOTE: This event may be triggered before the stream is opened, for example there are network errors opening the stream. |
streamElementsReceived |
jQuery-wrapped array of elements | Triggered when elements are received from the remote endpoint. The event data always contains at least one element. |
streamElementsSent |
jQuery-wrapped array of elements | Triggered when elements are sent to the remote endpoint. The event data always contains at least one element. |
streamOpened |
<stream:features/> element |
Triggered when the stream is opened. The event data is the set of features reported by the remote endpoint. |
UI Events
Name | Data Details | Description |
---|---|---|
viewRendered |
jQuery(Element) | Triggered after the view is rendered, but before it is placed into the document. This event allows callbacks to modify the view. |
viewRemoved |
jQuery(Element) | Triggered after the view is removed from the document. |
viewActivated |
{//Type of activation type: String } |
Triggered when a view is activated. The <type> depends on the browser event that initiated it, typically "click" (mouse click on the view). |
viewDeactivated |
{//Type of deactivation type: String } |
Triggered when a view is deactivated. The <type> depends on the browser event that initiated it, typically "blur" (focus moved to a different widget/view). |
Name | Data Details | Description |
---|---|---|
actionComplete |
{// The user's action action: String, [error]: <error/> element } |
Triggered when a user chooses an action to complete the MUC invite request. This value is one of the following:
ACTION_JOIN , an optional error property may be present. If present, an error occurred while trying to join the room and this object describes the error. The error is the XMPP <error/> child element describing the failure. |
Name | Data Details | Description |
---|---|---|
rosterGroupingRendered |
{// The rendered Grouping grouping: jabberwerx.ui.RosterView.Grouping, // The rendered Grouping's DOM dom: jQuery } |
Triggered when a Grouping (not an item) in the roster is rendered. |
rosterItemRendered |
{// The rendered Item item: jabberwerx.ui.ContactPresenceView, // The rendered item's DOM dom: jQuery } |
Triggered when an item (not a Grouping) in the roster is rendered. |
rosterItemSelected |
{// The type of selection type: String, // The selected item item: jabberwerx.ui.ContactPresenceView } |
Triggered when an item (not a Grouping) in the roster is selected. The <type> denotes how the selection was made; this is one of:
|
Name | Data Details | Description |
---|---|---|
presenceSelected |
{//selected show value show: {String}, //selected status value status: {String}, //priority value (defaults to null) priority: {Number|null} } |
Triggered when a choice is selected, but before any <presence/> is sent out. Callbacks may change any or all of these values, and the changes will be included in the <presence/> that is sent. Any callback returning true will prevent this SelfPresenceView from sending a <presence/> , allowing callbacks to perform specialized handling (For example, adding "Custom..." to prompt the user to enter a new status value). |
Name | Data Details | Description |
---|---|---|
actionComplete |
{// The user's action action: String } |
Triggered when a user chooses an action to complete the subscription request. This value is one of the following:
|
Name | Data Details | Description |
---|---|---|
tabActivated |
Triggered when a tab was activated. This event is usually preceeded by a "tabDeactivated" event. | |
tabDeactivated |
Triggered when a tab was deactivated. This event is usually succeeded by a "tabActivated" event. |
Name | Data Details | Description |
---|---|---|
xdataItemSelected |
{// The selected item selected: jabberwerx.XDataFormItem } |
Triggered when item in the result set is clicked on. |
Name | Data Details | Description |
---|---|---|
textSend |
String | Triggered when a text is to be processed for sending. Any callback that returns true has indicated the sent data is processed, which causes any outstanding idle timers to be cancelled and the typed input to be cleared. |
textTypingStarted |
String | Triggered when it is determined that the user has started typing. This condition would equate to the "composing" chat state. |
textTypingEnded |
N/A | Triggered when it is determined the user stopped typing but did not request data to be sent (For example, cleared out the text area). This condition would equate to the "active" chat state, without sending any chat body. |
textTypingIdled |
N/A | Triggered when it is determined the user has suspended typing for an extended amount of time. This condition would equate to the "paused" chat state. |
Name | Data Details | Description |
---|---|---|
historyMessageAppended |
jQuery(Element) | Triggered when a message is about to be added to the MessageHistory window. You can change the jQuery object in place and those changes will be reflected in the MessageHistory window. |
Name | Data Details | Description |
---|---|---|
actionComplete |
{// The user's action action: String, submitted: jabberwerx.MUCRoom } |
Triggered when a user has selected a room and clicked the 'join' button. The 'action' property will be the following value:jabberwerx.ui.MUCSearchView.ACTION_SUBMITTED |
jabberwerx.cisco Events()
Name | Data Details | Description |
---|---|---|
LDAPContactAdded |
{// Group user name username: String, // Group's ID groupid: String, // How user should be displayed displayName: String } |
Triggered when a user is added to a group or as each new user is added during a member fetch. |
LDAPContactRemoved |
{// The node ID of the removed contact id: String, // Group's ID groupid: String } |
Triggered after the view is removed from the document. |
LDAPGroupRemoved |
{// ID of removed group groupid: String } |
Triggered when an entire group has been deleted. |
LDAPGroupNameUpdated |
{// ID of upgraded group groupid: String, // Group's new name groupname: String } |
Triggered when a group has changed names. |
LDAPGroupSearchResults |
{// ID of the current search (see xep-0055) resultid: String, // Result fields ldapGroups: Array of { // One Group's ID groupid: String, // And its name groupname: String } } |
Triggered when the results of requested group search are returned. |
LDAPUserSearchResults |
{// ID of the current search (see xep-0055) resultid: String, // Result fields ldapUsers: Array of { // Member's name username: String, // Member's display name displayname: String, // Other metadata email: String, jobtitle: String, phone: String } } |
Triggered when the results of a requested user search are returned. |
THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND is INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.
The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED "AS IS" WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL:http://www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)
© 2014 Cisco Systems, Inc. All rights reserved.