Class DefaultExtension

All Implemented Interfaces:
Extension, MessageExtension, Packet, PresenceExtension, QueryExtension,

public class DefaultExtension
extends XMLData
implements MessageExtension, QueryExtension, PresenceExtension, Packet

DefaultExtension is a backend-specific handler for extensions which are not known. Like all other Extension-derived objects, the one real requirement is that it be able to render itself back as equivalent XML.

Note: It is recommended that this class not be programmed directly for - it is backend specific, and could change substantially in the future - plus a serialized representation does not result in maintainable code

See Also:
MessageExtension, QueryExtension, PresenceExtension, Serialized Form

Constructor Summary
DefaultExtension(java.lang.String Element, java.lang.String XMLNS, java.lang.String XMLSnippet)
          Creates a new DefaultExtension instance.
Method Summary
 void appendItem(java.lang.StringBuffer retval)
          Returns the XML representation for the data contained within.
 java.lang.String getXMLNamespace()
          getXMLNamespace returns the XML namespace
Methods inherited from class org.jabber.jabberbeans.XMLData
appendAttrib, appendAttrib, appendChild, appendChild, escapeString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jabber.jabberbeans.Extension.Extension
Methods inherited from interface org.jabber.jabberbeans.Packet

Constructor Detail


public DefaultExtension(java.lang.String Element,
                        java.lang.String XMLNS,
                        java.lang.String XMLSnippet)
                 throws java.lang.InstantiationException
Creates a new DefaultExtension instance.

XMLNS - the XML Namespace
XMLSnippet - the full XML to be handled by the extension.
java.lang.InstantiationException - if either parameter is not passed in correctly
Method Detail


public java.lang.String getXMLNamespace()
getXMLNamespace returns the XML namespace

a String holding the XML Namespace


public void appendItem(java.lang.StringBuffer retval)
Returns the XML representation for the data contained within.

Specified by:
appendItem in interface Extension
Specified by:
appendItem in class XMLData
retval - The StringBuffer to append to
a String in XML.