|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.smack.packet.Packet
org.jivesoftware.smack.packet.IQ
public abstract class IQ
The base IQ (Info/Query) packet. IQ packets are used to get and set information on the server, including authentication, roster operations, and creating accounts. Each IQ packet has a specific type that indicates what type of action is being taken: "get", "set", "result", or "error".
IQ packets can contain a single child element that exists in a specific XML namespace. The combination of the element name and namespace determines what type of IQ packet it is. Some example IQ subpacket snippets:
Nested Class Summary | |
---|---|
static class |
IQ.Type
A class to represent the type of the IQ packet. |
Field Summary |
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet |
---|
DEFAULT_LANGUAGE, ID_NOT_AVAILABLE |
Constructor Summary | |
---|---|
IQ()
|
Method Summary | |
---|---|
abstract String |
getChildElementXML()
Returns the sub-element XML section of the IQ packet, or null if there isn't one. |
IQ.Type |
getType()
Returns the type of the IQ packet. |
void |
setType(IQ.Type type)
Sets the type of the IQ packet. |
String |
toXML()
Returns the packet as XML. |
Methods inherited from class org.jivesoftware.smack.packet.Packet |
---|
addExtension, deleteProperty, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, getXmlns, hashCode, nextID, parseXMLLang, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setProperty, setTo |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IQ()
Method Detail |
---|
public IQ.Type getType()
public void setType(IQ.Type type)
type
- the type of the IQ packet.public String toXML()
Packet
toXML
in class Packet
public abstract String getChildElementXML()
Extensions of this class must override this method.
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |