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 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 class
DeliveryReceiptRequest.Provider
This 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 String
addTo(Message message)
Add a delivery receipt request to an outgoing packet.static void
addTo(MessageBuilder messageBuilder)
Add a delivery receipt request to an outgoing packet.static DeliveryReceiptRequest
from(Stanza packet)
Get theDeliveryReceiptRequest
extension of the packet, if any.String
getElementName()
Returns the root element name.static DeliveryReceiptRequest
getFrom(Stanza p)
Deprecated.usefrom(Stanza)
insteadString
getNamespace()
Returns the root element XML namespace.String
toXML(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 String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DeliveryReceiptRequest
public DeliveryReceiptRequest()
-
-
Method Detail
-
getElementName
public String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
public String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
toXML
public String toXML(XmlEnvironment enclosingNamespace)
-
getFrom
@Deprecated public static DeliveryReceiptRequest getFrom(Stanza p)
Deprecated.usefrom(Stanza)
insteadGet theDeliveryReceiptRequest
extension of the packet, if any.- Parameters:
p
- the packet- Returns:
- the
DeliveryReceiptRequest
extension ornull
-
from
public static DeliveryReceiptRequest from(Stanza packet)
Get theDeliveryReceiptRequest
extension of the packet, if any.- Parameters:
packet
- the packet- Returns:
- the
DeliveryReceiptRequest
extension ornull
-
addTo
public static 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
-
-