public class PubSub extends IQ
IQ
packet. This is the topmost
element of all pubsub requests and replies as defined in the Publish-Subscribe
specification.IQ.IQChildElementXmlStringBuilder, IQ.Type
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT |
static String |
NAMESPACE |
IQ_ELEMENT, QUERY_ELEMENT
DEFAULT_LANGUAGE, ITEM, language, TEXT
Constructor and Description |
---|
PubSub() |
PubSub(PubSubNamespace ns) |
PubSub(String to,
IQ.Type type,
PubSubNamespace ns) |
Modifier and Type | Method and Description |
---|---|
static PubSub |
createPubsubPacket(String to,
IQ.Type type,
ExtensionElement extension,
PubSubNamespace ns) |
String |
getElementName()
Returns the XML element name of the extension sub-packet root element.
|
<PE extends ExtensionElement> |
getExtension(PubSubElementType elem) |
protected IQ.IQChildElementXmlStringBuilder |
getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder xml)
Returns the XML representation of a pubsub element according the specification.
|
createErrorResponse, createResultIQ, getChildElementName, getChildElementNamespace, getChildElementXML, getType, isRequestIQ, setType, toXML
addCommonAttributes, addExtension, addExtensions, appendErrorIfExists, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensions, getExtensionsXML, getFrom, getLanguage, getPacketID, getStanzaId, getTo, hasExtension, hasExtension, hasStanzaIdSet, overrideExtension, removeExtension, removeExtension, setError, setFrom, setLanguage, setPacketID, setStanzaId, setTo, toString
public static final String ELEMENT
public static final String NAMESPACE
public PubSub()
public PubSub(PubSubNamespace ns)
public PubSub(String to, IQ.Type type, PubSubNamespace ns)
public String getElementName()
public <PE extends ExtensionElement> PE getExtension(PubSubElementType elem)
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder xml)
<iq type='set' id="MlIpV-4" to="pubsub.gato.home" from="gato3@gato.home/Smack"> <pubsub xmlns="http://jabber.org/protocol/pubsub"> : Specific request extension : </pubsub> </iq>
getIQChildElementBuilder
in class IQ
xml
- a pre-created builder which already has the child element and the 'xmlns' attribute set.public static PubSub createPubsubPacket(String to, IQ.Type type, ExtensionElement extension, PubSubNamespace ns)