Namespace jabberwerx (MINIMAL)
Cisco AJAX XMPP Library is an easy to use, AJAX-based XMPP client. This namespace contains the core, non-UI classes and methods.
To use these features you must have an account on an XMPP server.
Events
The Cisco AJAX XMPP Library eventing mechanism is implemented in jabberwerx.EventDispatcher and jabberwerx.EventNotifier. Any possible event that may be fired will trigger on jabberwerx.globalEvents. See JabberWerx Events for all possible events.Configuration
The following configuration options are available:Name | Default | Description |
---|---|---|
persistDuration | 30 | The number of seconds that persisted data is considered to still be valid. |
capabilityFeatures | [] | The base capabilities for clients, not including those defined by enabled controllers |
capabilityIdentity | { category: "client", type: "pc", name: "JabberWerx AJAX", node: "http://jabber.cisco.com/jabberwerx" } |
The identity for clients' capabilities. |
unsecureAllowed | false | true if plaintext authentication is allowed over unencrypted or unsecured HTTP channels |
baseReconnectCountdown | 30 | base number of seconds between a disconnect occurring and a reconnect been initiated. The actual reconnect period will be the {baseReconnectCountdown} +/- x%, where x is a random number between 0 and 10. If {baseReconnectCountdown} is 0 then a reconnect will never be attempted. {baseReconnectCountdown} is also used as a persist password flag. If 0 password is never persisted and is cleared from memory as soon as possible (immediately after a connect ATTEMPT. IF > 0, password is persisted obfuscated and the password remains in memory (accessable through the client.connectParams object) |
enabledMechanisms | ["DIGEST-MD5", "PLAIN"] | The list of SASL mechanism to enable by default. |
To set any of these options, create an object called `jabberwerx_config` in the global namespace, like this:
jabberwerx_config = { persistDuration: 30, unsecureAllowed: false, capabilityFeatures: ['http://jabber.org/protocol/caps', 'http://jabber.org/protocol/chatstates', 'http://jabber.org/protocol/disco#info', 'http://jabber.org/protocol/muc', 'http://jabber.org/protocol/muc#user'], capabilityIdentity: { category: 'client', type: 'pc', name: 'JabberWerx AJAX', node: 'http://jabber.cisco.com/jabberwerx'}, baseReconnectCountdown: 30, enabledMechanisms: ["DIGEST-MD5", "PLAIN"] };
This code must be evaluated **before** including this file, jabberwerx.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
<static> |
jabberwerx.$
jQuery instance used by this library.
|
<static> |
jabberwerx.app
undocumented namespace for backwards compatablility
see jabberwerx.util.persistedApplicationClass
|
<static> |
jabberwerx.errorReporter
The singleton object of ErrorReporter. |
<static> |
jabberwerx.globalEvents
The global event dispatcher.
|
<static> |
jabberwerx.l10n
The global translator instance. |
<static> |
jabberwerx.sasl
The global SASL factory.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
jabberwerx._(istr)
Localizes and formats the given input string. |
The singleton object of ErrorReporter. Use this instead of creating a new ErrorReporter object.
The list of all known events are found in JabberWerx AJAX Events.
The global translator instance. Use this instead of creating new instances of Translator.
- See:
- jabberwerx.SASLMechanismFactory#mechanisms
- jabberwerx.SASLMechanismFactory#createMechanismFor
- jabberwerx.SASLMechanismFactory#addMechanism
- jabberwerx.SASLMechanismFactory#removeMechanism
Localizes and formats the given input string. This method performs the same operations as jabberwerx.Translator#format, but as a singleton method.
- Parameters:
- {String} istr
- The input string
- Returns:
- {String} The formatted/localized string