Package | org.igniterealtime.xiff.data |
Class | public class IQ |
Inheritance | IQ ![]() ![]() ![]() |
Implements | IIQ |
Property | Defined by | ||
---|---|---|---|
callback : Function
The function that will be called when an IQ result
is received with the same ID as one you send.
| IQ | ||
errorCallback : Function
The function that will be called when an IQ error
is received with the same ID as one you send.
| IQ | ||
![]() | 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.
| IQ | ||
![]() | 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 | ||
---|---|---|---|
IQ(recipient:EscapedJID = null, iqType:String = null, iqID:String = null, iqCallback:Function = null, iqErrorCallback:Function = null)
A class for abstraction and encapsulation of IQ (info-query) data.
| IQ | ||
![]() | ExtensionContainer | ||
![]() |
addTextNode(parent:XMLNode, elementName:String, value:String):XMLNode
Adds a simple text node to the parent node specified.
| XMLStanza | |
deserialize(xmlNode:XMLNode):Boolean
Deserializes an XML object and populates the IQ instance with its data.
| IQ | ||
![]() |
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.
| IQ | ||
![]() |
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
Serializes the IQ into XML form for sending to a server.
| IQ | ||
![]() |
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 | |
TYPE_ERROR : String = "error" [static]
The stanza reports an error that has occurred
regarding processing or delivery of a previously-sent get or
set request.
| IQ | ||
TYPE_GET : String = "get" [static]
The stanza requests information, inquires about what
data is needed in order to complete further operations, etc.
| IQ | ||
TYPE_RESULT : String = "result" [static]
The stanza is a response to a successful get or set request.
| IQ | ||
TYPE_SET : String = "set" [static]
The stanza provides data that is needed for an
operation to be completed, sets new values, replaces existing
values, etc.
| IQ | ||
![]() | XML_LANG : String = "en" [static]
| XMPPStanza |
callback | property |
callback:Function
[read-write]The function that will be called when an IQ result is received with the same ID as one you send.
Callback functions take one parameter which will be the IQ instance received from the server.
This isn't a required property, but is useful if you need to respond to server responses to an IQ.
Implementation public function get callback():Function
public function set callback(value:Function):void
errorCallback | property |
errorCallback:Function
[read-write]The function that will be called when an IQ error is received with the same ID as one you send.
Callback functions take one parameter which will be the IQ instance received from the server.
This isn't a required property, but is useful if you need to respond to server responses to an IQ.
Implementation public function get errorCallback():Function
public function set errorCallback(value:Function):void
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();
IQ | () | constructor |
public function IQ(recipient:EscapedJID = null, iqType:String = null, iqID:String = null, iqCallback:Function = null, iqErrorCallback:Function = null)
A class for abstraction and encapsulation of IQ (info-query) data.
Parametersrecipient:EscapedJID (default = null ) — The JID of the IQ recipient
|
|
iqType:String (default = null ) — The type of the IQ - there are static variables declared for each type
|
|
iqID:String (default = null ) — The unique ID of the IQ
|
|
iqCallback:Function (default = null ) — The function to be called when the server responds to the IQ
|
|
iqErrorCallback:Function (default = null ) — The object instance containing the callback method
|
deserialize | () | method |
public override function deserialize(xmlNode:XMLNode):Boolean
Deserializes an XML object and populates the IQ instance with its data.
ParametersxmlNode:XMLNode — The XML to deserialize
|
Boolean — An indication as to whether deserialization was sucessful
|
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 override function serialize(parentNode:XMLNode):Boolean
Serializes the IQ into XML form for sending to a server.
ParametersparentNode:XMLNode |
Boolean — An indication as to whether serialization was successful
|
TYPE_ERROR | constant |
public static const TYPE_ERROR:String = "error"
The stanza reports an error that has occurred regarding processing or delivery of a previously-sent get or set request.
See also
TYPE_GET | constant |
public static const TYPE_GET:String = "get"
The stanza requests information, inquires about what data is needed in order to complete further operations, etc.
TYPE_RESULT | constant |
public static const TYPE_RESULT:String = "result"
The stanza is a response to a successful get or set request.
TYPE_SET | constant |
public static const TYPE_SET:String = "set"
The stanza provides data that is needed for an operation to be completed, sets new values, replaces existing values, etc.