Class AdHocCommandData

  • All Implemented Interfaces:
    org.jivesoftware.smack.packet.Element, org.jivesoftware.smack.packet.IqView, org.jivesoftware.smack.packet.NamedElement, org.jivesoftware.smack.packet.StanzaView, org.jivesoftware.smack.packet.TopLevelStreamElement, org.jivesoftware.smack.packet.XmlElement, org.jivesoftware.smack.packet.XmlLangElement

    public class AdHocCommandData
    extends org.jivesoftware.smack.packet.IQ
    Represents the state and the request of the execution of an adhoc command.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AdHocCommandData.SpecificError  
      • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAction​(AdHocCommand.Action action)  
      void addNote​(AdHocCommandNote note)  
      AdHocCommand.Action getAction()
      Returns the action to execute.
      java.util.List<AdHocCommand.Action> getActions()  
      AdHocCommand.Action getExecuteAction()  
      DataForm getForm()
      Returns the form of the command.
      org.jxmpp.jid.Jid getId()
      Returns the JID of the command host.
      protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder​(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml)  
      java.lang.String getName()
      Returns the human name of the command.
      java.lang.String getNode()
      Returns the identifier of the command.
      java.util.List<AdHocCommandNote> getNotes()
      Returns the list of notes that the command has.
      java.lang.String getSessionID()  
      AdHocCommand.Status getStatus()
      Returns the status of the execution.
      void removeNote​(AdHocCommandNote note)  
      void setAction​(AdHocCommand.Action action)  
      void setExecuteAction​(AdHocCommand.Action executeAction)  
      void setForm​(DataForm form)  
      void setId​(org.jxmpp.jid.Jid id)  
      void setName​(java.lang.String name)  
      void setNode​(java.lang.String node)  
      void setSessionID​(java.lang.String sessionID)
      Set the 'sessionid' attribute of the command.
      void setStatus​(AdHocCommand.Status status)  
      • 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.StanzaView

        getError, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getFrom, getStanzaId, getTo, hasExtension, hasExtension, hasExtension
      • Methods inherited from interface org.jivesoftware.smack.packet.XmlElement

        getQName
    • Constructor Detail

      • AdHocCommandData

        public AdHocCommandData()
    • Method Detail

      • 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
      • getId

        public org.jxmpp.jid.Jid getId()
        Returns the JID of the command host.
        Returns:
        the JID of the command host.
      • setId

        public void setId​(org.jxmpp.jid.Jid id)
      • getName

        public java.lang.String getName()
        Returns the human name of the command.
        Returns:
        the name of the command.
      • setName

        public void setName​(java.lang.String name)
      • getNode

        public java.lang.String getNode()
        Returns the identifier of the command.
        Returns:
        the node.
      • setNode

        public void setNode​(java.lang.String node)
      • getNotes

        public java.util.List<AdHocCommandNote> getNotes()
        Returns the list of notes that the command has.
        Returns:
        the notes.
      • getForm

        public DataForm getForm()
        Returns the form of the command.
        Returns:
        the data form associated with the command.
      • setForm

        public void setForm​(DataForm form)
      • getAction

        public AdHocCommand.Action getAction()
        Returns the action to execute. The action is set only on a request.
        Returns:
        the action to execute.
      • getStatus

        public AdHocCommand.Status getStatus()
        Returns the status of the execution.
        Returns:
        the status.
      • setSessionID

        public void setSessionID​(java.lang.String sessionID)
        Set the 'sessionid' attribute of the command.

        This value can be null or empty for the first command, but MUST be set for subsequent commands. See also XEP-0050 ยง 3.3 Session Lifetime.

        Parameters:
        sessionID - TODO javadoc me please
      • getSessionID

        public java.lang.String getSessionID()