Interface StanzaView

    • Method Detail

      • getStanzaId

        java.lang.String getStanzaId()
        Returns the unique ID of the stanza. The returned value could be null.
        Returns:
        the packet's unique ID or null if the id is not available.
      • getTo

        Jid getTo()
        Returns who the stanza is being sent "to", or null if the value is not set. The XMPP protocol often makes the "to" attribute optional, so it does not always need to be set.

        Returns:
        who the stanza is being sent to, or null if the value has not been set.
      • getFrom

        Jid getFrom()
        Returns who the stanza is being sent "from" or null if the value is not set. The XMPP protocol often makes the "from" attribute optional, so it does not always need to be set.

        Returns:
        who the stanza is being sent from, or null if the value has not been set.
      • getError

        StanzaError getError()
        Returns the error associated with this packet, or null if there are no errors.
        Returns:
        the error sub-packet or null if there isn't an error.
      • hasExtension

        default boolean hasExtension​(javax.xml.namespace.QName qname)
      • hasExtension

        default boolean hasExtension​(java.lang.String namespace)
        Check if a extension element with the given namespace exists.
        Parameters:
        namespace - the namespace of the extension element to check for.
        Returns:
        true if a stanza extension exists, false otherwise.
      • getExtensions

        java.util.List<ExtensionElementgetExtensions()
        Returns a list of all extension elements of this stanza.
        Returns:
        a list of all extension elements of this stanza.
      • getExtensions

        <E extends ExtensionElement> java.util.List<E> getExtensions​(java.lang.Class<E> extensionElementClass)
        Return all extension elements of the given type. Returns the empty list if there a none.
        Type Parameters:
        E - the type of extension elements.
        Parameters:
        extensionElementClass - the class of the type of extension elements.
        Returns:
        a list of extension elements of that type, which may be empty.