Class Version
- java.lang.Object
-
- org.jivesoftware.smack.packet.Stanza
-
- org.jivesoftware.smack.packet.IQ
-
- org.jivesoftware.smackx.iqversion.packet.Version
-
- All Implemented Interfaces:
org.jivesoftware.smack.packet.Element
,org.jivesoftware.smack.packet.FullyQualifiedElement
,org.jivesoftware.smack.packet.IqView
,org.jivesoftware.smack.packet.NamedElement
,org.jivesoftware.smack.packet.StanzaView
,org.jivesoftware.smack.packet.TopLevelStreamElement
,org.jivesoftware.smack.packet.XmlLangElement
public class Version extends org.jivesoftware.smack.packet.IQ
A Version IQ packet, which is used by XMPP clients to discover version information about the software running at another entity's JID.
-
-
Constructor Summary
Constructors Constructor Description Version()
Version(java.lang.String name, java.lang.String version)
Version(java.lang.String name, java.lang.String version, java.lang.String os)
Creates a new Version object with given details.Version(Version original)
Version(org.jxmpp.jid.Jid to)
Request version IQ.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Version
createResultFor(org.jivesoftware.smack.packet.Stanza request, Version version)
protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder
getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml)
java.lang.String
getName()
Returns the natural-language name of the software.java.lang.String
getOs()
Returns the operating system of the queried entity.java.lang.String
getVersion()
Returns the specific version of the software.void
setOs(java.lang.String os)
Sets the operating system of the queried entity.-
Methods inherited from class org.jivesoftware.smack.packet.IQ
createErrorResponse, createErrorResponse, createErrorResponse, createResultIQ, getChildElementName, getChildElementNamespace, getChildElementQName, getChildElementXML, getElementName, getType, isRequestIQ, isResponseIQ, setType, toString, toXML
-
Methods inherited from class org.jivesoftware.smack.packet.Stanza
addCommonAttributes, addExtension, addExtensions, appendErrorIfExists, getDefaultLanguage, getError, getExtension, getExtension, getExtension, getExtensionElement, getExtensions, getExtensions, getExtensions, getExtensions, getExtensionsMap, getFrom, getLanguage, getNamespace, getStanzaId, getTo, hasExtension, hasExtension, hasStanzaIdSet, logCommonAttributes, overrideExtension, removeExtension, removeExtension, setError, setError, setFrom, setLanguage, setNewStanzaId, setStanzaId, setStanzaId, setTo, throwIfNoStanzaId
-
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Version
public Version()
-
Version
public Version(org.jxmpp.jid.Jid to)
Request version IQ.- Parameters:
to
- the jid where to request version from
-
Version
public Version(java.lang.String name, java.lang.String version)
-
Version
public Version(java.lang.String name, java.lang.String version, java.lang.String os)
Creates a new Version object with given details.- Parameters:
name
- The natural-language name of the software. This element is REQUIRED.version
- The specific version of the software. This element is REQUIRED.os
- The operating system of the queried entity. This element is OPTIONAL.
-
Version
public Version(Version original)
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the natural-language name of the software. This property will always be present in a result.- Returns:
- the natural-language name of the software.
-
getVersion
public java.lang.String getVersion()
Returns the specific version of the software. This property will always be present in a result.- Returns:
- the specific version of the software.
-
getOs
public java.lang.String getOs()
Returns the operating system of the queried entity. This property will always be present in a result.- Returns:
- the operating system of the queried entity.
-
setOs
public void setOs(java.lang.String os)
Sets the operating system of the queried entity. This message should only be invoked when parsing the XML and setting the property to a Version instance.- Parameters:
os
- operating system of the queried entity.
-
getIQChildElementBuilder
protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml)
- Specified by:
getIQChildElementBuilder
in classorg.jivesoftware.smack.packet.IQ
-
-