Packageorg.igniterealtime.xiff.core
Classpublic class AbstractJID
SubclassesEscapedJID, UnescapedJID

This is a base class for the JID (Jabber ID) classes. This class should not be instantiated directly, but should be subclassed instead. It provides functionality to determine if a JID is valid, as well as extract the node, domain and resource from the JID. The structure of JID is defined in RFC3920. jid = [ node "



Public Properties
 PropertyDefined by
  bareJID : String
[read-only] The JID without the resource.
AbstractJID
  domain : String
[read-only] The domain portion of the JID.
AbstractJID
  node : String
[read-only] The node portion of the JID.
AbstractJID
  resource : String
[read-only] The resource portion of the JID.
AbstractJID
Protected Properties
 PropertyDefined by
  _domain : String = ""
AbstractJID
  jidNodeValidator : RegExp
[static]
AbstractJID
  _node : String = ""
AbstractJID
  _resource : String = ""
AbstractJID
Public Methods
 MethodDefined by
  
AbstractJID(inJID:String, validate:Boolean = false)
Creates a new AbstractJID object.
AbstractJID
  
escapedNode(n:String):String
[static] Provides functionality to convert a JID to an escaped format.
AbstractJID
  
toString():String
Converts JID represented by this class to a String.
AbstractJID
  
unescapedNode(n:String):String
[static] Provides functionality to return an escaped JID into a normal String.
AbstractJID
Property detail
bareJIDproperty
bareJID:String  [read-only]

The JID without the resource.

Implementation
    public function get bareJID():String
_domainproperty 
protected var _domain:String = ""
domainproperty 
domain:String  [read-only]

The domain portion of the JID.

Implementation
    public function get domain():String
jidNodeValidatorproperty 
protected static var jidNodeValidator:RegExp
_nodeproperty 
protected var _node:String = ""
nodeproperty 
node:String  [read-only]

The node portion of the JID.

Implementation
    public function get node():String
_resourceproperty 
protected var _resource:String = ""
resourceproperty 
resource:String  [read-only]

The resource portion of the JID.

Implementation
    public function get resource():String
Constructor detail
AbstractJID()constructor
public function AbstractJID(inJID:String, validate:Boolean = false)

Creates a new AbstractJID object. Used via EscapedJID or UnescapedJID.

Each allowable portion of a JID (node identifier, domain identifier, and resource identifier) MUST NOT be more than 1023 bytes in length, resulting in a maximum total size (including the ’Parameters

inJID:String — The JID as a String.
 
validate:Boolean (default = false) — True if the JID should be validated.
Method detail
escapedNode()method
public static function escapedNode(n:String):String

Provides functionality to convert a JID to an escaped format.

Parameters
n:String — The string to escape.

Returns
String — The escaped string.
toString()method 
public function toString():String

Converts JID represented by this class to a String.

Returns
String — The JID as a String.
unescapedNode()method 
public static function unescapedNode(n:String):String

Provides functionality to return an escaped JID into a normal String.

Parameters
n:String — The string to unescape.

Returns
String — The unescaped string.