Packageorg.igniterealtime.xiff.data.feature
Classpublic class FeatureNegotiationExtension
InheritanceFeatureNegotiationExtension Inheritance Extension Inheritance XMLStanza Inheritance ExtensionContainer Inheritance Object
Implements IExtension

XEP-0020: Feature Negotiation

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

http://xmpp.org/extensions/xep-0020.html
org.igniterealtime.xiff.data.forms.FormExtension
org.igniterealtime.xiff.data.si.FileTransferExtension


Public Properties
 PropertyDefined By
 Inheritedxml : XML
[override] Override in order to take care of setting the Namespace and checking for containing extensions.
Extension
Public Methods
 MethodDefined By
  
FeatureNegotiationExtension(parent:XML = null)
Use FormExtension as a child extension.
FeatureNegotiationExtension
 Inherited
Add extension to the list of the given namespace and insert to the XML element as a child.
ExtensionContainer
 Inherited
ExtensionContainer
 Inherited
getAllExtensionsByNS(nameSpace:String):Array
ExtensionContainer
 Inherited
getAttribute(name:String):String
Convinience method for getting element value from the XML.
XMLStanza
 Inherited
getChildAttribute(elem:String, name:String):String
Convinience method for getting child element attribute value from the XML.
XMLStanza
 Inherited
getChildField(elem:String, name:String):String
Convinience method for getting child element value from the XML.
XMLStanza
  
FeatureNegotiationExtension
 Inherited
getExtension(elementName:String):IExtension
Get the extension having the given element name.
ExtensionContainer
 Inherited
getField(name:String):String
Convinience method for getting element value from the XML.
XMLStanza
  
getNS():String
FeatureNegotiationExtension
 Inherited
remove():void
Removes the extension from its parent.
Extension
 Inherited
removeAllExtensions(nameSpace:String):void
ExtensionContainer
 Inherited
removeExtension(extension:IExtension):Boolean
ExtensionContainer
 Inherited
removeFields(name:String):void
Helper method for removing all child elements that have the given name.
XMLStanza
 Inherited
setAttribute(name:String, value:String):void
Convinience method for setting a value to a element in the XML.
XMLStanza
 Inherited
setChildAttribute(elem:String, name:String, value:String):void
Convinience method for setting an attribute for a child element of the XML.
XMLStanza
 Inherited
setChildField(elem:String, name:String, value:String):void
Convinience method for setting a value for a child element of the XML.
XMLStanza
 Inherited
setField(name:String, value:String):void
Convinience method for setting a value to a element in the XML.
XMLStanza
 Inherited
toString():String
Converts the base stanza XML to a string.
XMLStanza
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NS : Namespace
[static] Default XML namespace.
XMLStanza
  ELEMENT_NAME : String = feature
[static]
FeatureNegotiationExtension
 InheritedFLASH_NS : Namespace
[static]
XMLStanza
  NS : String = http://jabber.org/protocol/feature-neg
[static]
FeatureNegotiationExtension
 InheritedSTREAM_NS : Namespace
[static]
XMLStanza
Constructor Detail
FeatureNegotiationExtension()Constructor
public function FeatureNegotiationExtension(parent:XML = null)

Use FormExtension as a child extension.

Parameters
parent:XML (default = null)
Method Detail
getElementName()method
public function getElementName():String

Returns
String
getNS()method 
public function getNS():String

Returns
String
Constant Detail
ELEMENT_NAMEConstant
public static const ELEMENT_NAME:String = feature

NSConstant 
public static const NS:String = http://jabber.org/protocol/feature-neg