| 
 | Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.smack.packet.Packet
org.jivesoftware.smack.packet.IQ
org.jivesoftware.smackx.packet.Version
public class Version
A Version IQ packet, which is used by XMPP clients to discover version information about the software running at another entity's JID.
An example to discover the version of the server:
 // Request the version from the server.
 Version versionRequest = new Version();
 timeRequest.setType(IQ.Type.GET);
 timeRequest.setTo("example.com");
 // Create a packet collector to listen for a response.
 PacketCollector collector = con.createPacketCollector(
                new PacketIDFilter(versionRequest.getPacketID()));
 con.sendPacket(versionRequest);
 // Wait up to 5 seconds for a result.
 IQ result = (IQ)collector.nextResult(5000);
 if (result != null && result.getType() == IQ.Type.RESULT) {
     Version versionResult = (Version)result;
     // Do something with result...
 }
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | 
|---|
| IQ.Type | 
| Field Summary | 
|---|
| Fields inherited from class org.jivesoftware.smack.packet.Packet | 
|---|
| DEFAULT_LANGUAGE, ID_NOT_AVAILABLE | 
| Constructor Summary | |
|---|---|
| Version() | |
| Method Summary | |
|---|---|
|  String | getChildElementXML()Returns the sub-element XML section of the IQ packet, or null if there isn't one. | 
|  String | getName()Returns the natural-language name of the software. | 
|  String | getOs()Returns the operating system of the queried entity. | 
|  String | getVersion()Returns the specific version of the software. | 
|  void | setName(String name)Sets the natural-language name of the software. | 
|  void | setOs(String os)Sets the operating system of the queried entity. | 
|  void | setVersion(String version)Sets the specific version of the software. | 
| Methods inherited from class org.jivesoftware.smack.packet.IQ | 
|---|
| createErrorResponse, createResultIQ, getType, setType, toXML | 
| 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, 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 Version()
| Method Detail | 
|---|
public String getName()
public void setName(String name)
name - the natural-language name of the software.public String getVersion()
public void setVersion(String version)
version - the specific version of the software.public String getOs()
public void setOs(String os)
os - operating system of the queried entity.public String getChildElementXML()
IQExtensions of this class must override this method.
getChildElementXML in class IQ| 
 | Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||