Package | org.igniterealtime.xiff.core |
Class | public class AbstractJID |
Inheritance | AbstractJID ![]() |
Subclasses | EscapedJID, UnescapedJID |
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 "@" ] domain [ "/" resource ]
domain = fqdn / address-literal
fqdn = (sub-domain 1"." sub-domain))
sub-domain = (internationalized domain label)
address-literal = IPv4address / IPv6address
See also
Property | Defined 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 |
Property | Defined By | ||
---|---|---|---|
_domain : String | AbstractJID | ||
jidNodeValidator : RegExp [static] | AbstractJID | ||
_node : String | AbstractJID | ||
_resource : String | AbstractJID |
Method | Defined 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 |
_domain | property |
protected var _domain:String
_node | property |
protected var _node:String
_resource | property |
protected var _resource:String
bareJID | property |
bareJID:String
[read-only] The JID without the resource.
public function get bareJID():String
domain | property |
domain:String
[read-only] The domain portion of the JID.
public function get domain():String
jidNodeValidator | property |
protected static var jidNodeValidator:RegExp
node | property |
node:String
[read-only] The node portion of the JID.
public function get node():String
resource | property |
resource:String
[read-only] The resource portion of the JID.
public function get resource():String
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 @ and / separators) of 3071 bytes.
ParametersinJID:String — The JID as a String.
| |
validate:Boolean (default = false ) — True if the JID should be validated.
|
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.
|
String — The escaped string.
TODO: simplify with native methods
|
See also
toString | () | method |
public function toString():String
Converts JID represented by this class to a String.
ReturnsString — 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.
|
String — The unescaped string.
|