Class DeliveryReceiptRequest

java.lang.Object
org.jivesoftware.smackx.receipts.DeliveryReceiptRequest
All Implemented Interfaces:
org.jivesoftware.smack.packet.Element, org.jivesoftware.smack.packet.ExtensionElement, org.jivesoftware.smack.packet.NamedElement, org.jivesoftware.smack.packet.XmlElement, org.jivesoftware.smack.packet.XmlLangElement

public class DeliveryReceiptRequest extends Object implements org.jivesoftware.smack.packet.ExtensionElement
Represents a message delivery receipt request entry as specified by Message Delivery Receipts.
  • Field Details

  • Constructor Details

    • DeliveryReceiptRequest

      public DeliveryReceiptRequest()
  • Method Details

    • getElementName

      public String getElementName()
      Specified by:
      getElementName in interface org.jivesoftware.smack.packet.NamedElement
    • getNamespace

      public String getNamespace()
      Specified by:
      getNamespace in interface org.jivesoftware.smack.packet.XmlElement
    • toXML

      public String toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
      Specified by:
      toXML in interface org.jivesoftware.smack.packet.Element
    • getFrom

      @Deprecated public static DeliveryReceiptRequest getFrom(org.jivesoftware.smack.packet.Stanza p)
      Deprecated.
      use from(Stanza) instead
      Get the DeliveryReceiptRequest extension of the packet, if any.
      Parameters:
      p - the packet
      Returns:
      the DeliveryReceiptRequest extension or null
    • from

      public static DeliveryReceiptRequest from(org.jivesoftware.smack.packet.Stanza packet)
      Get the DeliveryReceiptRequest extension of the packet, if any.
      Parameters:
      packet - the packet
      Returns:
      the DeliveryReceiptRequest extension or null
    • addTo

      public static String addTo(org.jivesoftware.smack.packet.Message message)
      Add a delivery receipt request to an outgoing packet. Only message packets may contain receipt requests as of XEP-0184, therefore only allow Message as the parameter type.
      Parameters:
      message - Message object to add a request to
      Returns:
      the Message ID which will be used as receipt ID
    • addTo

      public static void addTo(org.jivesoftware.smack.packet.MessageBuilder messageBuilder)
      Add a delivery receipt request to an outgoing packet. Only message packets may contain receipt requests as of XEP-0184, therefore only allow Message as the parameter type.
      Parameters:
      messageBuilder - Message object to add a request to