Packageorg.igniterealtime.xiff.core
Classpublic class XMPPTLSConnection
InheritanceXMPPTLSConnection Inheritance XMPPConnection Inheritance flash.events.EventDispatcher
ImplementsIXMPPConnection

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



Public Properties
 PropertyDefined by
 Inheritedcompress : Boolean
Shall the zlib compression be allowed if the server supports it.
XMPPConnection
  config : TLSConfig
TLS configuration.
XMPPTLSConnection
 Inheriteddomain : String
The XMPP domain to use with the server.
XMPPConnection
 InheritedignoreWhitespace : Boolean
Determines whether whitespace will be ignored on incoming XML data.
XMPPConnection
 InheritedincomingBytes : uint
Get the count of the received bytes.
XMPPConnection
 Inheritedjid : UnescapedJID
Gets the fully qualified unescaped JID of the user.
XMPPConnection
 InheritedopenConnections : Array
[static] Reference to all active connections.
XMPPConnection
 InheritedoutgoingBytes : uint
Get the count of current bytes sent by this connection
XMPPConnection
 Inheritedpassword : String
The password to use when logging in.
XMPPConnection
 Inheritedport : uint
The port to use when connecting.
XMPPConnection
 InheritedqueuePresences : Boolean
Should the connection queue presence events for a small interval so that it can send multiple in a batch?
XMPPConnection
 Inheritedresource : String
The resource to use when logging in.
XMPPConnection
 Inheritedserver : String
The XMPP server to use for connection.
XMPPConnection
  tls : Boolean
Specifies whether to enable TLS.
XMPPTLSConnection
 InheriteduseAnonymousLogin : Boolean
Whether to use anonymous login or not.
XMPPConnection
 Inheritedusername : String
The username to use for connection.
XMPPConnection
Protected Properties
 PropertyDefined by
 Inheritedactive : Boolean
XMPPConnection
 Inherited_server : String
Server to connect, could be different of the login domain.
XMPPConnection
 Inheritedsocket : Socket
Binary socket used to connect to the XMPP server.
XMPPConnection
Public Methods
 MethodDefined by
  
Constructor.
XMPPTLSConnection
 Inherited
changePassword(password:String):void
Changes the user's account password on the server.
XMPPConnection
  
connect(streamType:uint = 0):Boolean
Connects to the server.
XMPPTLSConnection
 Inherited
disableSASLMechanism(name:String):void
[static] Remove a SASL mechanism.
XMPPConnection
  
disconnect():void
Disconnects from the server if currently connected.
XMPPTLSConnection
 Inherited
Issues a request for the information that must be submitted for registration with the server.
XMPPConnection
 Inherited
isActive():Boolean
Determines whether the connection with the server is currently active.
XMPPConnection
 Inherited
isLoggedIn():Boolean
Determines whether the user is connected and logged into the server.
XMPPConnection
 Inherited
registerSASLMechanism(name:String, authClass:Class):void
[static] Add a SASL mechanism.
XMPPConnection
 Inherited
send(data:IXMPPStanza):void
Sends data to the server.
XMPPConnection
 Inherited
Sends ping to server in order to keep the connection alive.
XMPPConnection
 Inherited
sendRegistrationFields(fieldMap:Object, key:String):void
Registers a new account with the server, sending the registration data as specified in the fieldMap
XMPPConnection
Protected Methods
 MethodDefined by
  
XMPPTLSConnection
  
handleNodeType(node:XMLNode):void
XMPPTLSConnection
  
handleStreamTLS(node:XMLNode):void
XMPPTLSConnection
Events
 EventSummaryDefined by
 Inherited Dispatched when a password change is successful.XMPPConnection
 Inherited Dispatched when the connection is successfully made to the server.XMPPConnection
 Inherited Dispatched when there is a disconnection from the server.XMPPConnection
 Inherited Dispatched when there is some type of XMPP error.XMPPConnection
 Inherited Dispatched whenever there is incoming XML data.XMPPConnection
 Inherited Dispatched on successful authentication (login) with the server.XMPPConnection
 Inherited Dispatched on incoming messages.XMPPConnection
 Inherited Dispatched whenever data is sent to the server.XMPPConnection
 Inherited Dispatched on incoming presence data.XMPPConnection
 Inherited Dispatched on when new user account registration is successful.XMPPConnection
Public Constants
 ConstantDefined by
 InheritedSTREAM_TYPE_FLASH : uint = 2
[static] Stream type lets user set opening/closing tag.
XMPPConnection
 InheritedSTREAM_TYPE_FLASH_TERMINATED : uint = 3
[static] Stream type lets user set opening/closing tag.
XMPPConnection
 InheritedSTREAM_TYPE_STANDARD : uint = 0
[static] Stream type lets user set opening/closing tag.
XMPPConnection
 InheritedSTREAM_TYPE_STANDARD_TERMINATED : uint = 1
[static] Stream type lets user set opening/closing tag.
XMPPConnection
Property detail
configproperty
config:TLSConfig  [read-write]

TLS configuration.

Implementation
    public function get config():TLSConfig
    public function set config(value:TLSConfig):void
tlsproperty 
tls:Boolean  [read-write]

Specifies whether to enable TLS.

Implementation
    public function get tls():Boolean
    public function set tls(value:Boolean):void
Constructor detail
XMPPTLSConnection()constructor
public function XMPPTLSConnection()

Constructor.

Method detail
configureTLSSocket()method
protected function configureTLSSocket():void

See also

com.hurlant.crypto.tls.TLSSocket
connect()method 
public override function connect(streamType:uint = 0):Boolean

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.

Returns
Boolean — A boolean indicating whether the server was found.
disconnect()method 
public override function disconnect():void

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

handleNodeType()method 
protected override function handleNodeType(node:XMLNode):void

Parameters
node:XMLNode
handleStreamTLS()method 
protected override function handleStreamTLS(node:XMLNode):void

Parameters
node:XMLNode — The feature containing starttls tag.