Package | org.igniterealtime.xiff.data.feature |
Class | public class FeatureNegotiationExtension |
Inheritance | FeatureNegotiationExtension ![]() ![]() ![]() ![]() |
Implements | IExtension |
Features are negotiated through the exchange of
iq or message stanzas
containing feature child elements qualified
by the 'http://jabber.org/protocol/feature-neg' namespace.
However, this feature element is simply a
wrapper for structured data encapsulated in the
Data Forms (FormExtension
) protocol.
In order to begin a negotation, the initiator sends an iq stanza of type "get" (or a message stanza type "normal" - see Stanza Session Negotiation for examples) to the recipient with a single feature element containing a data form of type "form" which defines the available options for one or more features. Each feature is represented as an x-data "field".
The recipient SHOULD examine each feature and the values of the options provided. In order to indicate preferred values, the recipient then SHOULD specify one value for each feature and return a data form of type "submit" to the initiator in an iq stanza of type "result" (or a message stanza type "normal").
The following examples show some likely scenarios for feature
negotiation between entities. Further examples can be found in
"using protocols", such as File Transfer
(FileTransferExtension
).
Peter Millard, the primary author of this specification from version 0.1 through version 1.4, died on April 26, 2006. The remaining authors are thankful for Peter's work on this specification.
See also
Method | Defined By | ||
---|---|---|---|
FeatureNegotiationExtension(parent:XML = null)
Use FormExtension as a child extension. | FeatureNegotiationExtension | ||
![]() |
Add extension to the list of the given namespace and insert to the XML element as a child. | ExtensionContainer | |
![]() | getAllExtensions():Array | ExtensionContainer | |
![]() | getAllExtensionsByNS(nameSpace:String):Array | ExtensionContainer | |
![]() | getAttribute(name:String):String
Convinience method for getting element value from the XML. | XMLStanza | |
![]() | getChildAttribute(elem:String, name:String):String
Convinience method for getting child element attribute value from the XML. | XMLStanza | |
![]() | getChildField(elem:String, name:String):String
Convinience method for getting child element value from the XML. | XMLStanza | |
getElementName():String | FeatureNegotiationExtension | ||
![]() | getExtension(elementName:String):IExtension
Get the extension having the given element name. | ExtensionContainer | |
![]() | getField(name:String):String
Convinience method for getting element value from the XML. | XMLStanza | |
getNS():String | FeatureNegotiationExtension | ||
![]() | remove():void
Removes the extension from its parent. | Extension | |
![]() | removeAllExtensions(nameSpace:String):void | ExtensionContainer | |
![]() | removeExtension(extension:IExtension):Boolean | ExtensionContainer | |
![]() | removeFields(name:String):void
Helper method for removing all child elements that have the given name. | XMLStanza | |
![]() | setAttribute(name:String, value:String):void
Convinience method for setting a value to a element in the XML. | XMLStanza | |
![]() | setChildAttribute(elem:String, name:String, value:String):void
Convinience method for setting an attribute for a child element of the XML. | XMLStanza | |
![]() | setChildField(elem:String, name:String, value:String):void
Convinience method for setting a value for a child element of the XML. | XMLStanza | |
![]() | setField(name:String, value:String):void
Convinience method for setting a value to a element in the XML. | XMLStanza | |
![]() | toString():String
Converts the base stanza XML to a string. | XMLStanza |
Constant | Defined By | ||
---|---|---|---|
![]() | DEFAULT_NS : Namespace [static]
Default XML namespace. | XMLStanza | |
ELEMENT_NAME : String = feature [static] | FeatureNegotiationExtension | ||
![]() | FLASH_NS : Namespace [static]
| XMLStanza | |
NS : String = http://jabber.org/protocol/feature-neg [static] | FeatureNegotiationExtension | ||
![]() | STREAM_NS : Namespace [static]
| XMLStanza |
FeatureNegotiationExtension | () | Constructor |
public function FeatureNegotiationExtension(parent:XML = null)
Use FormExtension
as a child extension.
parent:XML (default = null )
|
getElementName | () | method |
public function getElementName():String
ReturnsString |
getNS | () | method |
public function getNS():String
ReturnsString |
ELEMENT_NAME | Constant |
public static const ELEMENT_NAME:String = feature
NS | Constant |
public static const NS:String = http://jabber.org/protocol/feature-neg