Class 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.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ

        org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder, org.jivesoftware.smack.packet.IQ.ResponseType, org.jivesoftware.smack.packet.IQ.Type
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELEMENT  
      static java.lang.String NAMESPACE  
      • Fields inherited from class org.jivesoftware.smack.packet.IQ

        IQ_ELEMENT, QUERY_ELEMENT
      • Fields inherited from class org.jivesoftware.smack.packet.Stanza

        DEFAULT_LANGUAGE, ITEM, language, TEXT
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.jivesoftware.smack.packet.Element

        toXML, toXML
      • Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement

        getQName
      • Methods inherited from interface org.jivesoftware.smack.packet.StanzaView

        getError, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getFrom, getStanzaId, getTo, hasExtension, hasExtension, hasExtension
    • 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 class org.jivesoftware.smack.packet.IQ
      • createResultFor

        public static Version createResultFor​(org.jivesoftware.smack.packet.Stanza request,
                                              Version version)