|
Smack | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jivesoftware.smack.packet.Packet | +--org.jivesoftware.smack.packet.IQ
A generic 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". The actual data of an IQ packet is normally enclosed in the query section with a specific namespace.
Nested Class Summary | |
static class |
IQ.Type
A class to represent the type of the IQ packet. |
Constructor Summary | |
IQ()
|
Method Summary | |
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, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, 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 String getChildElementXML()
Generally, extensions of this class should override this method. This lets the majority of IQ XML writing be generic, with each sub-class providing just the packet-specific XML.
|
Smack | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |