Package | org.igniterealtime.xiff.data |
Class | public dynamic class XMPPStanza |
Inheritance | XMPPStanza ![]() ![]() |
Implements | IXMPPStanza |
Subclasses | IQ, Message, Presence |
See also
Property | Defined by | ||
---|---|---|---|
errorCode : int
The error code, assuming this stanza contains error information.
| XMPPStanza | ||
errorCondition : String
The error condition, assuming this stanza contains error information.
| XMPPStanza | ||
errorMessage : String
The error message, assuming this stanza contains error information.
| XMPPStanza | ||
errorType : String
The error type, assuming this stanza contains error information.
| XMPPStanza | ||
![]() | _exts : Object | ExtensionContainer | |
from : EscapedJID
The JID of the sender.
| XMPPStanza | ||
id : String
The unique identifier of this stanza.
| XMPPStanza | ||
idGenerator : IIDGenerator
[static]
The ID generator for this stanza type.
| XMPPStanza | ||
to : EscapedJID
The JID of the recipient.
| XMPPStanza | ||
type : String
The stanza type.
| XMPPStanza | ||
![]() | XMLData : XML [static]
| XMLStanza | |
![]() | XMLFactory : XMLDocument [static]
| XMLStanza |
Method | Defined by | ||
---|---|---|---|
The following four first attributes are common to message, presence, and IQ stanzas.
| XMPPStanza | ||
![]() | ExtensionContainer | ||
![]() |
addTextNode(parent:XMLNode, elementName:String, value:String):XMLNode
Adds a simple text node to the parent node specified.
| XMLStanza | |
deserialize(xmlNode:XMLNode):Boolean
| XMPPStanza | ||
![]() |
ensureNode(node:XMLNode, elementName:String):XMLNode
Ensures that a node with a specific element name exists in the stanza.
| XMLStanza | |
![]() |
exists(value:*):Boolean
[static]
A helper method to determine if a value is both not null
and not undefined.
| XMLStanza | |
generateID(prefix:String = null):String
[static]
Generates a unique ID for the stanza.
| XMPPStanza | ||
![]() |
getAllExtensions():Array
| ExtensionContainer | |
![]() |
getAllExtensionsByNS(ns:String):Array
| ExtensionContainer | |
![]() |
getExtension(name:String):Extension
| ExtensionContainer | |
![]() |
getNode():XMLNode
| XMLStanza | |
![]() |
removeAllExtensions(ns:String):void
| ExtensionContainer | |
![]() |
removeExtension(ext:IExtension):Boolean
| ExtensionContainer | |
![]() |
replaceTextNode(parent:XMLNode, original:XMLNode, elementName:String, value:String):XMLNode
Replaces one node in the stanza with another simple text node.
| XMLStanza | |
serialize(parentNode:XMLNode):Boolean
Prepares the XML version of the stanza for transmission to the server.
| XMPPStanza | ||
![]() |
setNode(node:XMLNode):Boolean
Sets the XML node that should be used for this stanza's internal XML representation.
| XMLStanza |
Constant | Defined by | ||
---|---|---|---|
CLIENT_NAMESPACE : String = "jabber:client" [static]
| XMPPStanza | ||
CLIENT_VERSION : String = "1.0" [static]
The version of XMPP specified in RFC 3920 is "1.0"; in particular, this
encapsulates the stream-related protocols (Use of TLS (Section 5),
Use of SASL (Section 6), and Stream Errors (Section 4.7)), as well as
the semantics of the three defined XML stanza types (
| XMPPStanza | ||
NAMESPACE_FLASH : String = "http://www.jabber.com/streams/flash" [static]
| XMPPStanza | ||
NAMESPACE_STREAM : String = "http://etherx.jabber.org/streams" [static]
| XMPPStanza | ||
XML_LANG : String = "en" [static]
| XMPPStanza |
errorCode | property |
errorCode:int
[read-write]The error code, assuming this stanza contains error information. Error codes are deprecated in standard XMPP, but they are commonly used by older Jabber servers like Jabberd 1.4. For more information on error codes, and corresponding error conditions, see http://xmpp.org/extensions/xep-0086.html.
Implementation public function get errorCode():int
public function set errorCode(value:int):void
errorCondition | property |
errorCondition:String
[read-write]The error condition, assuming this stanza contains error information. For more information on error conditions, see http://xmpp.org/extensions/xep-0086.html.
Implementation public function get errorCondition():String
public function set errorCondition(value:String):void
errorMessage | property |
errorMessage:String
[read-write]The error message, assuming this stanza contains error information.
Implementation public function get errorMessage():String
public function set errorMessage(value:String):void
errorType | property |
errorType:String
[read-write]The error type, assuming this stanza contains error information. For more information on error types, see http://xmpp.org/extensions/xep-0086.html.
Implementation public function get errorType():String
public function set errorType(value:String):void
from | property |
from:EscapedJID
[read-write]The JID of the sender. Most, if not all, server implementations follow the specifications that prevent this from being falsified. Thus, under normal circumstances, you don't need to supply this information because the server will fill it in automatically.
Implementation public function get from():EscapedJID
public function set from(value:EscapedJID):void
id | property |
id:String
[read-write]
The unique identifier of this stanza. ID generation is accomplished using
the static generateID
method of the particular stanza type.
public function get id():String
public function set id(value:String):void
See also
idGenerator | property |
idGenerator:IIDGenerator
[read-write]The ID generator for this stanza type. ID generators must implement the IIDGenerator interface. The XIFF library comes with a few default ID generators that have already been implemented (see org.igniterealtime.xiff.data.id.. Setting the ID generator by stanza type is useful if you'd like to use different ID generation schemes for each type. For instance, messages could use the incremental ID generation scheme provided by the IncrementalGenerator class, while IQs could use the shared object ID generation scheme provided by the SOIncrementalGenerator class.
Implementation public static function get idGenerator():IIDGenerator
public function set idGenerator(value:IIDGenerator):void
Message.idGenerator = new IncrementalGenerator();
to | property |
to:EscapedJID
[read-write]The JID of the recipient.
Implementation public function get to():EscapedJID
public function set to(value:EscapedJID):void
type | property |
type:String
[read-write]The stanza type. There are MANY types available, depending on what kind of stanza this is. The XIFF Library defines the types for IQ, Presence, and Message in each respective class as static string variables. Below is a listing of each: IQ
public function get type():String
public function set type(value:String):void
XMPPStanza | () | constructor |
public function XMPPStanza(recipient:EscapedJID, sender:EscapedJID, theType:String, theID:String, nName:String)
The following four first attributes are common to message, presence, and IQ stanzas. The fifth, xml:lang, is not included here.
Parametersrecipient:EscapedJID — to
|
|
sender:EscapedJID — from
|
|
theType:String — type
|
|
theID:String — id
|
|
nName:String |
deserialize | () | method |
public function deserialize(xmlNode:XMLNode):Boolean
Parameters
xmlNode:XMLNode |
Boolean |
generateID | () | method |
public static function generateID(prefix:String = null):String
Generates a unique ID for the stanza. ID generation is handled using a variety of mechanisms, but the default for the library uses the IncrementalGenerator.
Parametersprefix:String (default = null ) — The prefix for the ID to be generated
|
String — The generated ID
|
serialize | () | method |
public function serialize(parentNode:XMLNode):Boolean
Prepares the XML version of the stanza for transmission to the server.
ParametersparentNode:XMLNode — (Optional) The parent node that the stanza should be appended to during serialization
|
Boolean — An indication as to whether serialization was successful
|
CLIENT_NAMESPACE | constant |
public static const CLIENT_NAMESPACE:String = "jabber:client"
CLIENT_VERSION | constant |
public static const CLIENT_VERSION:String = "1.0"
The version of XMPP specified in RFC 3920 is "1.0"; in particular, this
encapsulates the stream-related protocols (Use of TLS (Section 5),
Use of SASL (Section 6), and Stream Errors (Section 4.7)), as well as
the semantics of the three defined XML stanza types (
NAMESPACE_FLASH | constant |
public static const NAMESPACE_FLASH:String = "http://www.jabber.com/streams/flash"
NAMESPACE_STREAM | constant |
public static const NAMESPACE_STREAM:String = "http://etherx.jabber.org/streams"
XML_LANG | constant |
public static const XML_LANG:String = "en"