public class PubSub
extends org.jivesoftware.smack.packet.IQ
IQ
packet. This is the topmost
element of all pubsub requests and replies as defined in the Publish-Subscribe
specification.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
Constructor and Description |
---|
PubSub() |
PubSub(java.lang.String to,
org.jivesoftware.smack.packet.IQ.Type type) |
PubSub(java.lang.String to,
org.jivesoftware.smack.packet.IQ.Type type,
PubSubNamespace ns) |
Modifier and Type | Method and Description |
---|---|
static PubSub |
createPubsubPacket(java.lang.String to,
org.jivesoftware.smack.packet.IQ.Type type,
org.jivesoftware.smack.packet.PacketExtension extension,
PubSubNamespace ns) |
java.lang.String |
getChildElementXML()
Returns the XML representation of a pubsub element according the specification.
|
java.lang.String |
getElementName()
Returns the XML element name of the extension sub-packet root element.
|
org.jivesoftware.smack.packet.PacketExtension |
getExtension(PubSubElementType elem) |
java.lang.String |
getNamespace()
Returns the XML namespace of the extension sub-packet root element.
|
PubSubNamespace |
getPubSubNamespace()
Returns the current value of the namespace.
|
void |
setPubSubNamespace(PubSubNamespace ns)
Set the namespace for the packet if it something other than the default
case of
PubSubNamespace.BASIC . |
createErrorResponse, createResultIQ, getType, setType, toXML
addCommonAttributes, addExtension, addExtensions, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setTo, toString
public static final java.lang.String ELEMENT
public static final java.lang.String NAMESPACE
public PubSub()
public PubSub(java.lang.String to, org.jivesoftware.smack.packet.IQ.Type type)
public PubSub(java.lang.String to, org.jivesoftware.smack.packet.IQ.Type type, PubSubNamespace ns)
public java.lang.String getElementName()
public java.lang.String getNamespace()
public void setPubSubNamespace(PubSubNamespace ns)
PubSubNamespace.BASIC
. The getNamespace()
method will return
the result of calling PubSubNamespace.getXmlns()
on the specified enum.ns
- - The new value for the namespace.public org.jivesoftware.smack.packet.PacketExtension getExtension(PubSubElementType elem)
public PubSubNamespace getPubSubNamespace()
getNamespace()
method will return
the result of calling PubSubNamespace.getXmlns()
this value.public java.lang.String getChildElementXML()
<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>
getChildElementXML
in class org.jivesoftware.smack.packet.IQ
public static PubSub createPubsubPacket(java.lang.String to, org.jivesoftware.smack.packet.IQ.Type type, org.jivesoftware.smack.packet.PacketExtension extension, PubSubNamespace ns)