Package org.jivesoftware.smackx.receipts
Class DeliveryReceiptRequest
- java.lang.Object
-
- org.jivesoftware.smackx.receipts.DeliveryReceiptRequest
-
- All Implemented Interfaces:
Element,ExtensionElement,FullyQualifiedElement,NamedElement,XmlLangElement
public class DeliveryReceiptRequest extends java.lang.Object implements ExtensionElement
Represents a message delivery receipt request entry as specified by Message Delivery Receipts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeliveryReceiptRequest.ProviderThis Provider parses and returns DeliveryReceiptRequest packets.
-
Constructor Summary
Constructors Constructor Description DeliveryReceiptRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringaddTo(Message message)Add a delivery receipt request to an outgoing packet.static voidaddTo(MessageBuilder messageBuilder)Add a delivery receipt request to an outgoing packet.static DeliveryReceiptRequestfrom(Stanza packet)Get theDeliveryReceiptRequestextension of the packet, if any.java.lang.StringgetElementName()Returns the root element name.static DeliveryReceiptRequestgetFrom(Stanza p)Deprecated.usefrom(Stanza)insteadjava.lang.StringgetNamespace()Returns the root element XML namespace.java.lang.StringtoXML(XmlEnvironment enclosingNamespace)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
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
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
-
Constructor Detail
-
DeliveryReceiptRequest
public DeliveryReceiptRequest()
-
-
Method Detail
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElementReturns the root element name.- Specified by:
getElementNamein interfaceNamedElement- Returns:
- the element name.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElementReturns the root element XML namespace.- Specified by:
getNamespacein interfaceFullyQualifiedElement- Returns:
- the namespace.
-
toXML
public java.lang.String toXML(XmlEnvironment enclosingNamespace)
-
getFrom
@Deprecated public static DeliveryReceiptRequest getFrom(Stanza p)
Deprecated.usefrom(Stanza)insteadGet theDeliveryReceiptRequestextension of the packet, if any.- Parameters:
p- the packet- Returns:
- the
DeliveryReceiptRequestextension ornull
-
from
public static DeliveryReceiptRequest from(Stanza packet)
Get theDeliveryReceiptRequestextension of the packet, if any.- Parameters:
packet- the packet- Returns:
- the
DeliveryReceiptRequestextension ornull
-
addTo
public static java.lang.String addTo(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(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
-
-