Packageorg.igniterealtime.xiff.core
Classpublic class XMPPConnection
InheritanceXMPPConnection Inheritance flash.events.EventDispatcher
Implements IXMPPConnection
Subclasses XMPPBOSHConnection, XMPPRTMPConnection, XMPPTLSConnection

This class is used to connect to and manage data coming from an XMPP server. Use one instance of this class per connection.



Public Properties
 PropertyDefined By
  active : Boolean
Determines whether the connection with the server is currently active.
XMPPConnection
  compress : Boolean
Shall the Stream Compression be allowed if the server supports it.
XMPPConnection
  compressor : ICompressor
The class that is to be used for Stream Compression if enabled.
XMPPConnection
  domain : String
The XMPP domain to use with the server.
XMPPConnection
  incomingBytes : uint
[read-only] Get the total count of the received bytes in the current session.
XMPPConnection
  jid : UnescapedJID
[read-only] Gets the fully qualified unescaped JID of the user.
XMPPConnection
  loggedIn : Boolean
Determines whether the user is connected and logged into the server.
XMPPConnection
  openConnections : Array
[static] [read-only] Reference to all active connections.
XMPPConnection
  outgoingBytes : uint
[read-only] Get the total count of the bytes sent in the current session.
XMPPConnection
  password : String
The password to use when logging in.
XMPPConnection
  port : uint
The port to use when connecting.
XMPPConnection
  queuePresences : Boolean
Should the connection queue presence events for a small interval so that it can send multiple in a batch?
XMPPConnection
  registrationSupported : Boolean
[read-only] Does the connection support registration.
XMPPConnection
  resource : String
The resource to use when logging in.
XMPPConnection
  server : String
The XMPP server to use for connection.
XMPPConnection
  useAnonymousLogin : Boolean
Whether to use anonymous login or not.
XMPPConnection
  username : String
The username to use for connection.
XMPPConnection
Protected Properties
 PropertyDefined By
  closingStreamTag : String
Depending of the STREAM_TYPE_used in the connect() method, this variable will contain a matching closing element for it.
XMPPConnection
  _compressor : ICompressor = null
Static class that is used to handle the compression
XMPPConnection
  expireTagSearch : Boolean = false
Once received data from the socket, should the closing tag be seached? Initially this should be true as for the first incoming data there might be an error available.
XMPPConnection
  featuresAvailable : XML
Features as provided by the server, in their original XML form.
XMPPConnection
  openingStreamTag : String
Opening part of the stream tag, such as <stream:stream or <flash:stream
XMPPConnection
  pendingIQs : Object
Hash to hold callbacks for IQs
XMPPConnection
  pingNotSupported : Boolean
Server supports keeping the connection alive with Ping extension
XMPPConnection
  presenceQueue : Array
List of incoming presences that are waiting to be dispatched
XMPPConnection
  _registrationSupported : Boolean = false
XMPPConnection
  _server : String
Server to connect, could be different of the login domain.
XMPPConnection
  socket : Socket
Binary socket used to connect to the XMPP server.
XMPPConnection
  streamTagSearch : String = stream:stream
Depending of the STREAM_TYPE_used in the connect() method, the name of the opening tag for stream is saved in this variable, such as stream:stream or flash:stream.
XMPPConnection
  tlsEnabled : Boolean = false
XMPPConnection
  tlsRequired : Boolean = false
Even if this class is not implementing TLS, it needs to be aware if it has been extended by XMPPTLSConnection that will set this value to true.
XMPPConnection
Public Methods
 MethodDefined By
  
Constructor.
XMPPConnection
  
connect(streamType:uint = 0):void
Connects to the server.
XMPPConnection
  
disableExtensions(... exts):void
Disable the given extensions from the registery.
XMPPConnection
  
disableSASLMechanism(name:String):void
Remove a SASL mechanism from this connection
XMPPConnection
  
disconnect():void
Disconnects from the server if currently connected.
XMPPConnection
  
enableExtensions(... exts):void
Enable the given extensions for interacting with the incoming data.
XMPPConnection
  
enableSASLMechanism(name:String, authClass:Class):void
Add a SASL mechanism available for this connection
XMPPConnection
  
send(data:IXMPPStanza):void
Sends data to the server.
XMPPConnection
  
Sends ping to server in order to keep the connection alive, in case the server has not indicated that it would not support it.
XMPPConnection
Protected Methods
 MethodDefined By
  
SASL Authentication should been set up, begin the authentication process by sending the initial request.
XMPPConnection
  
Upon being so informed that resource binding is required, the client MUST bind a resource to the stream by sending to the server an IQ stanza of type "set" (see IQ Semantics (Section 9.2.3)) containing data qualified by the 'urn:ietf:params:xml:ns:xmpp-bind' namespace.
XMPPConnection
  
checkIncomingData(bytedata:ByteArray):XML
Check if the incoming data is complete once added to any existing incoming data.
XMPPConnection
  
chooseStreamTags(type:uint):void
Choose the stream start and ending tags based on the given type.
XMPPConnection
  
configureAuthMechanisms(mechanisms:XML):void
Use the authentication which is first in the list (saslMechanisms) if possible.
XMPPConnection
  
configureStreamCompression(method:String = zlib):void
Zlib is the most common and the one which is required to be implemented in case Stream Compression is used.
XMPPConnection
  
Set up the connection and listeners related to this class.
XMPPConnection
  
dispatchError(condition:String, message:String, type:String, code:int = 0, extension:Extension = null):void
XMPPConnection
  
Runs after binding
XMPPConnection
  
flushPresenceQueue(event:TimerEvent):void
Dispatches a single PresenceEvent in case there are any in the queue.
XMPPConnection
  
handleAuthentication(response:XML):void
Upon receiving a success indication within the SASL negotiation, the client MUST send a new stream header to the server, to which the server MUST respond with a stream header as well as a list of available stream features.
XMPPConnection
  
handleMessage(node:XML):void
TODO: Add similar extension handling as in IQ, after message specific extensions are separated from Message class, v3.2.0
XMPPConnection
  
handleNodeType(node:XML):void
Calls a appropriate parser base on the nodeName.
XMPPConnection
  
Handle the incoming Presence either with the queue timer or directly dispatching the PresenceEvent.
XMPPConnection
  
handleStream(node:XML):void
Initial stream element has been received once this method is called.
XMPPConnection
  
handleStreamError(node:XML):void
Handle stream error related element.
XMPPConnection
  
handleStreamFeatures(node:XML):void
Handle features that are available in the connected server.
XMPPConnection
  
handleStreamTLS(node:XML):void
Checks if the TLS feature available is required or not and dispatches an error in case it is.
XMPPConnection
  
onIOError(event:IOErrorEvent):void
This fires the standard dispatchError method
XMPPConnection
  
parseDataReceived(bytedata:ByteArray):void
Parses the data which the socket just received.
XMPPConnection
  
Remove those listeners that the createConnection method added.
XMPPConnection
  
sendData(data:String):void
Dispatches OutgoingDataEvent, handles possible Stream Compression and calls sendDataToServer.
XMPPConnection
  
sendDataToServer(data:ByteArray):void
Overwrite this method to use other kind of socket, request or connection, if needed.
XMPPConnection
  
sendXML(data:String):void
Pass through to sendData which takes care of the common data handling between all connection classes.
XMPPConnection
  
Send a response to the Service Discovery query.
XMPPConnection
Events
 Event Summary Defined By
  
Dispatched on incoming IQ data that has an enabled extension.XMPPConnection
  Dispatched when the connection is successfully made to the server.XMPPConnection
  Dispatched when there is a disconnection from the server.XMPPConnection
  Dispatched when there is some type of XMPP error.XMPPConnection
  Dispatched whenever there is incoming XML data.XMPPConnection
  Dispatched on successful authentication (login) with the server.XMPPConnection
  Dispatched on incoming messages.XMPPConnection
  Dispatched whenever data is sent to the server.XMPPConnection
  Dispatched on incoming presence data.XMPPConnection
Public Constants
 ConstantDefined By
  STREAM_TYPE_FLASH : uint = 2
[static] Stream type lets user set opening/closing tag.
XMPPConnection
  STREAM_TYPE_FLASH_TERMINATED : uint = 3
[static] Stream type lets user set opening/closing tag.
XMPPConnection
  STREAM_TYPE_STANDARD : uint = 0
[static] Stream type lets user set opening/closing tag.
XMPPConnection
  STREAM_TYPE_STANDARD_TERMINATED : uint = 1
[static] Stream type lets user set opening/closing tag.
XMPPConnection
Protected Constants
 ConstantDefined By
  saslMechanisms : Object
The types of SASL mechanisms available.
XMPPConnection
Property Detail
_compressorproperty
protected var _compressor:ICompressor = null

Static class that is used to handle the compression

_registrationSupportedproperty 
protected var _registrationSupported:Boolean = false

_serverproperty 
protected var _server:String

Server to connect, could be different of the login domain.

activeproperty 
active:Boolean

Determines whether the connection with the server is currently active.

Not necessarily logged in. For login status, use the loggedIn method.


Implementation
    public function get active():Boolean
    public function set active(value:Boolean):void

See also

closingStreamTagproperty 
protected var closingStreamTag:String

Depending of the STREAM_TYPE_used in the connect() method, this variable will contain a matching closing element for it. parseDataReceived() method will use this value.

compressproperty 
compress:Boolean

Shall the Stream Compression be allowed if the server supports it.

compressor needs to be set too.

The default value is false.


Implementation
    public function get compress():Boolean
    public function set compress(value:Boolean):void

See also

compressorproperty 
compressor:ICompressor

The class that is to be used for Stream Compression if enabled.

The default value is null.


Implementation
    public function get compressor():ICompressor
    public function set compressor(value:ICompressor):void

See also

domainproperty 
domain:String

The XMPP domain to use with the server. User domain. Used as the server unless server is specifically set to something different.


Implementation
    public function get domain():String
    public function set domain(value:String):void
expireTagSearchproperty 
protected var expireTagSearch:Boolean = false

Once received data from the socket, should the closing tag be seached? Initially this should be true as for the first incoming data there might be an error available. TODO: Not used, not needed?

featuresAvailableproperty 
protected var featuresAvailable:XML

Features as provided by the server, in their original XML form.

incomingBytesproperty 
incomingBytes:uint  [read-only]

Get the total count of the received bytes in the current session.

Mainly useful for tracking network traffic.


Implementation
    public function get incomingBytes():uint
jidproperty 
jid:UnescapedJID  [read-only]

Gets the fully qualified unescaped JID of the user.

A fully-qualified JID includes the resource. A bare JID does not. To get the bare JID, use the bareJID property of the UnescapedJID.


Implementation
    public function get jid():UnescapedJID

See also

loggedInproperty 
loggedIn:Boolean

Determines whether the user is connected and logged into the server.


Implementation
    public function get loggedIn():Boolean
    public function set loggedIn(value:Boolean):void

See also

openConnectionsproperty 
openConnections:Array  [read-only]

Reference to all active connections.


Implementation
    public static function get openConnections():Array
openingStreamTagproperty 
protected var openingStreamTag:String

Opening part of the stream tag, such as <stream:stream or <flash:stream

outgoingBytesproperty 
outgoingBytes:uint  [read-only]

Get the total count of the bytes sent in the current session. Mainly useful for tracking network traffic.


Implementation
    public function get outgoingBytes():uint
passwordproperty 
password:String

The password to use when logging in.


Implementation
    public function get password():String
    public function set password(value:String):void
pendingIQsproperty 
protected var pendingIQs:Object

Hash to hold callbacks for IQs

pingNotSupportedproperty 
protected var pingNotSupported:Boolean

Server supports keeping the connection alive with Ping extension

See also

portproperty 
port:uint

The port to use when connecting.

The default value is 5222.


Implementation
    public function get port():uint
    public function set port(value:uint):void
presenceQueueproperty 
protected var presenceQueue:Array

List of incoming presences that are waiting to be dispatched

queuePresencesproperty 
queuePresences:Boolean

Should the connection queue presence events for a small interval so that it can send multiple in a batch?

The default value is true To maintain original behavior -- has to be explicitly set to false to disable..


Implementation
    public function get queuePresences():Boolean
    public function set queuePresences(value:Boolean):void
registrationSupportedproperty 
registrationSupported:Boolean  [read-only]

Does the connection support registration. Find out after initial features have arrived.


Implementation
    public function get registrationSupported():Boolean

See also

resourceproperty 
resource:String

The resource to use when logging in. A resource is required (defaults to "XIFF") and allows a user to login using the same account simultaneously (most likely from multiple machines). Typical examples of the resource include "Home" or "Office" to indicate the user's current location.


Implementation
    public function get resource():String
    public function set resource(value:String):void
serverproperty 
server:String

The XMPP server to use for connection. Server to connect, could be different of the login/user domain.


Implementation
    public function get server():String
    public function set server(value:String):void
socketproperty 
protected var socket:Socket

Binary socket used to connect to the XMPP server.

streamTagSearchproperty 
protected var streamTagSearch:String = stream:stream

Depending of the STREAM_TYPE_used in the connect() method, the name of the opening tag for stream is saved in this variable, such as stream:stream or flash:stream.

Default value matches the default value of connect() method, which is STREAM_TYPE_STANDARD.

tlsEnabledproperty 
protected var tlsEnabled:Boolean = false

tlsRequiredproperty 
protected var tlsRequired:Boolean = false

Even if this class is not implementing TLS, it needs to be aware if it has been extended by XMPPTLSConnection that will set this value to true.

For example handleStreamFeatures uses this value.

See also

useAnonymousLoginproperty 
useAnonymousLogin:Boolean

Whether to use anonymous login or not.


Implementation
    public function get useAnonymousLogin():Boolean
    public function set useAnonymousLogin(value:Boolean):void
usernameproperty 
username:String

The username to use for connection. If this property is null when connect() is called, the class will fetch registration field data rather than attempt to login.


Implementation
    public function get username():String
    public function set username(value:String):void
Constructor Detail
XMPPConnection()Constructor
public function XMPPConnection()

Constructor. By default will enable the following extensions:

Method Detail
beginAuthentication()method
protected function beginAuthentication():void

SASL Authentication should been set up, begin the authentication process by sending the initial request.

Make sure that the username and password are set, or the connection is using anonymous authentication before calling this method.

bindConnection()method 
protected function bindConnection():void

Upon being so informed that resource binding is required, the client MUST bind a resource to the stream by sending to the server an IQ stanza of type "set" (see IQ Semantics (Section 9.2.3)) containing data qualified by the 'urn:ietf:params:xml:ns:xmpp-bind' namespace.

If the client wishes to allow the server to generate the resource identifier on its behalf, it sends an IQ stanza of type "set" that contains an empty bind element.

Client asks server to bind a resource:

		 
		 

checkIncomingData()method 
protected function checkIncomingData(bytedata:ByteArray):XML

Check if the incoming data is complete once added to any existing incoming data.

Parameters

bytedata:ByteArray

Returns
XML — XML that is complete, or just null in case it is not complete
chooseStreamTags()method 
protected function chooseStreamTags(type:uint):void

Choose the stream start and ending tags based on the given type.

Parameters

type:uint — One of the STREAM_TYPE_... constants of this class.

configureAuthMechanisms()method 
protected function configureAuthMechanisms(mechanisms:XML):void

Use the authentication which is first in the list (saslMechanisms) if possible.

Parameters

mechanisms:XML

See also

configureStreamCompression()method 
protected function configureStreamCompression(method:String = zlib):void

Zlib is the most common and the one which is required to be implemented in case Stream Compression is used.

Ask the server to enable Zlib compression of the stream.

Supported types in XMPP are zlib and lzw.

XIFF however only supports zlib and only after the Adler32 checksum is somehow implemented.

Flash Player 11.4, code named "Dolores" (second half of 2012) will have LZMA ByteArray compression available...

Parameters

method:String (default = zlib)

See also

connect()method 
public function connect(streamType:uint = 0):void

Connects to the server. Use one of the STREAM_TYPE_.. constants. Possible options are:

Some servers, like Jabber, Inc.'s XCP and Jabberd 1.4 expect <flash:stream> from a Flash client instead of the standard <stream:stream>.

Parameters

streamType:uint (default = 0) — Any of the STREAM_TYPE_.. constants.

createConnection()method 
protected function createConnection():void

Set up the connection and listeners related to this class.

This method should be overridden in any class that would extend this one and provide alternative way for connectiong, such as BOSH or TLSSocket.

See also

flash.net.Socket
disableExtensions()method 
public function disableExtensions(... exts):void

Disable the given extensions from the registery. This is mainly useful only at runtime.

Parameters

... exts

disableSASLMechanism()method 
public function disableSASLMechanism(name:String):void

Remove a SASL mechanism from this connection

Parameters

name:String

disconnect()method 
public function disconnect():void

Disconnects from the server if currently connected. After disconnect, a DisconnectionEvent.DISCONNECT event is broadcast.

See also

dispatchError()method 
protected function dispatchError(condition:String, message:String, type:String, code:int = 0, extension:Extension = null):void

Parameters

condition:String
 
message:String
 
type:String
 
code:int (default = 0) — Legacy code, try not to use. Will be removed in XIFF 3.2.0
 
extension:Extension (default = null)

enableExtensions()method 
public function enableExtensions(... exts):void

Enable the given extensions for interacting with the incoming data. Once an extension is enabled, it can be listened by adding an event listener to its namespace.

Some extensions might responce to an incoming request, such as SoftwareVersionExtension if enabled

Notes about extension dependencies:

Parameters

... exts

enableSASLMechanism()method 
public function enableSASLMechanism(name:String, authClass:Class):void

Add a SASL mechanism available for this connection

Parameters

name:String
 
authClass:Class

establishSession()method 
protected function establishSession():void

Runs after binding

See also

flushPresenceQueue()method 
protected function flushPresenceQueue(event:TimerEvent):void

Dispatches a single PresenceEvent in case there are any in the queue. This event will contain all the presences available at this given moment.

Parameters

event:TimerEvent

handleAuthentication()method 
protected function handleAuthentication(response:XML):void

Upon receiving a success indication within the SASL negotiation, the client MUST send a new stream header to the server, to which the server MUST respond with a stream header as well as a list of available stream features.

Parameters

response:XML

handleMessage()method 
protected function handleMessage(node:XML):void

TODO: Add similar extension handling as in IQ, after message specific extensions are separated from Message class, v3.2.0

Parameters

node:XML

handleNodeType()method 
protected function handleNodeType(node:XML):void

Calls a appropriate parser base on the nodeName.

Parameters

node:XML

handlePresence()method 
protected function handlePresence(node:XML):Presence

Handle the incoming Presence either with the queue timer or directly dispatching the PresenceEvent. In both cases the event occurs right after this method.

Parameters

node:XML

Returns
Presence
handleStream()method 
protected function handleStream(node:XML):void

Initial stream element has been received once this method is called.

Parameters

node:XML

handleStreamError()method 
protected function handleStreamError(node:XML):void

Handle stream error related element.

RFC 3920 (XMPP Core, published October 2004), in chapters 4.7. defines Stream Errors:

MUST contain a child element corresponding to one of the defined stanza error conditions defined below; this element MUST be qualified by the 'urn:ietf:params:xml:ns:xmpp-streams' namespace.

MAY contain a text child containing XML character data that describes the error in more detail; this element MUST be qualified by the 'urn:ietf:params:xml:ns:xmpp-streams' namespace and SHOULD possess an 'xml:lang' attribute specifying the natural language of the XML character data.

Parameters

node:XML — Error node

See also

handleStreamFeatures()method 
protected function handleStreamFeatures(node:XML):void

Handle features that are available in the connected server.

FeatureXML ElementDescriptionDocumentation
amp<amp xmlns='http://jabber.org/features/amp'>Support for Advanced Message ProcessingXEP-0079: Advanced Message Processing
compress<compression xmlns='http://jabber.org/features/compress'>Support for Stream CompressionXEP-0138: Stream Compression
iq-auth<auth xmlns='http://jabber.org/features/iq-auth'>Support for Non-SASL AuthenticationXEP-0078: Non-SASL Authentication
iq-register<register xmlns='http://jabber.org/features/iq-register'>Support for In-Band RegistrationXEP-0077: In-Band Registration
bind<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>Support for Resource BindingRFC 6120: XMPP Core
mechanisms<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Support for Simple Authentication and Security Layer (SASL)RFC 6120: XMPP Core
session<session xmlns='urn:ietf:params:xml:ns:xmpp-session'>Support for IM Session EstablishmentRFC 6121: XMPP IM
starttls<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'>Support for Transport Layer Security (TLS)RFC 6120: XMPP Core
sm<sm xmlns='urn:xmpp:sm:3'>Support for Stream ManagementXEP-0198: Stream Management

The XMPP RFCs define an ordering for the features defined therein, namely:

  1. TLS, requires the use of XMPPTLSConnection
  2. In-band registration, if registration needed
  3. SASL
  4. Stream compression, if used
  5. Resource binding

Parameters

node:XML

See also

handleStreamTLS()method 
protected function handleStreamTLS(node:XML):void

Checks if the TLS feature available is required or not and dispatches an error in case it is.

A connection class supporting TLS should override this handler.

Parameters

node:XML — The feature containing starttls tag.

See also

onIOError()method 
protected function onIOError(event:IOErrorEvent):void

This fires the standard dispatchError method

Parameters

event:IOErrorEvent

parseDataReceived()method 
protected function parseDataReceived(bytedata:ByteArray):void

Parses the data which the socket just received. Used to simplify the overrides from classes extending this one.

Dispatches the IncomingDataEvent. Also takes care of increasing the incoming bytes statistic.

Parameters

bytedata:ByteArray

removeSocketEventListeners()method 
protected function removeSocketEventListeners():void

Remove those listeners that the createConnection method added.

send()method 
public function send(data:IXMPPStanza):void

Sends data to the server. If the data to send cannot be serialized properly, this method throws a SerializeException.

Parameters

data:IXMPPStanza — The data to send. This must be an instance of a class that implements the INodeProxy interface.

See also


Example
The following example sends a basic chat message to the user with the JID "sideshowbob@springfieldpenitentiary.gov". var message:Message = new Message( "sideshowbob@springfieldpenitentiary.gov", null, "Hi Bob.", "Hi Bob.", Message.TYPE_CHAT ); myXMPPConnection.send( message );
sendData()method 
protected function sendData(data:String):void

Dispatches OutgoingDataEvent, handles possible Stream Compression and calls sendDataToServer.

Also takes care of increasing the outgoing bytes statistic.

Parameters

data:String — XML that is not always complete for a reason, like sending the closing element

sendDataToServer()method 
protected function sendDataToServer(data:ByteArray):void

Overwrite this method to use other kind of socket, request or connection, if needed.

Then use the sendXML method when sending XML.

Parameters

data:ByteArray

sendKeepAlive()method 
public function sendKeepAlive():void

Sends ping to server in order to keep the connection alive, in case the server has not indicated that it would not support it. TODO: Whitespace keepalive if ping not supported...

sendXML()method 
protected function sendXML(data:String):void

Pass through to sendData which takes care of the common data handling between all connection classes.

Parameters

data:String

serviceDiscoveryResponce()method 
protected function serviceDiscoveryResponce(to:EscapedJID, id:String):void

Send a response to the Service Discovery query.

Parameters

to:EscapedJID
 
id:String

See also

Event Detail
Event
Event Object Type: org.igniterealtime.xiff.events.IQEvent
IQEvent.type property = org.igniterealtime.xiff.events.IQEvent

Dispatched on incoming IQ data that has an enabled extension.

connection Event  
Event Object Type: org.igniterealtime.xiff.events.ConnectionSuccessEvent
ConnectionSuccessEvent.type property = org.igniterealtime.xiff.events.ConnectionSuccessEvent.CONNECT_SUCCESS

Dispatched when the connection is successfully made to the server.

disconnection Event  
Event Object Type: org.igniterealtime.xiff.events.DisconnectionEvent
DisconnectionEvent.type property = org.igniterealtime.xiff.events.DisconnectionEvent.DISCONNECT

Dispatched when there is a disconnection from the server.

error Event  
Event Object Type: org.igniterealtime.xiff.events.XIFFErrorEvent
XIFFErrorEvent.type property = org.igniterealtime.xiff.events.XIFFErrorEvent.XIFF_ERROR

Dispatched when there is some type of XMPP error.

incomingData Event  
Event Object Type: org.igniterealtime.xiff.events.IncomingDataEvent
IncomingDataEvent.type property = org.igniterealtime.xiff.events.IncomingDataEvent.INCOMING_DATA

Dispatched whenever there is incoming XML data.

login Event  
Event Object Type: org.igniterealtime.xiff.events.LoginEvent
LoginEvent.type property = org.igniterealtime.xiff.events.LoginEvent.LOGIN

Dispatched on successful authentication (login) with the server.

message Event  
Event Object Type: org.igniterealtime.xiff.events.MessageEvent
MessageEvent.type property = org.igniterealtime.xiff.events.MessageEvent.MESSAGE

Dispatched on incoming messages.

outgoingData Event  
Event Object Type: org.igniterealtime.xiff.events.OutgoingDataEvent
OutgoingDataEvent.type property = org.igniterealtime.xiff.events.OutgoingDataEvent.OUTGOING_DATA

Dispatched whenever data is sent to the server.

presence Event  
Event Object Type: org.igniterealtime.xiff.events.PresenceEvent
PresenceEvent.type property = org.igniterealtime.xiff.events.PresenceEvent.PRESENCE

Dispatched on incoming presence data.

Constant Detail
saslMechanismsConstant
protected const saslMechanisms:Object

The types of SASL mechanisms available. Indexed by their MECHANISM constant.

By default, only Anonymous and DigestMD5 are enabled.

See also

STREAM_TYPE_FLASHConstant 
public static const STREAM_TYPE_FLASH:uint = 2

Stream type lets user set opening/closing tag. <flash:stream>

STREAM_TYPE_FLASH_TERMINATEDConstant 
public static const STREAM_TYPE_FLASH_TERMINATED:uint = 3

Stream type lets user set opening/closing tag. <flash:stream />

STREAM_TYPE_STANDARDConstant 
public static const STREAM_TYPE_STANDARD:uint = 0

Stream type lets user set opening/closing tag. <stream:stream>

STREAM_TYPE_STANDARD_TERMINATEDConstant 
public static const STREAM_TYPE_STANDARD_TERMINATED:uint = 1

Stream type lets user set opening/closing tag. <stream:stream />