public class DelayInfo extends DelayInformation
DelayInformation class to transparently support
both the new Delay Delivery specification XEP-0203 and
the old one XEP-0091.
Existing code can be backward compatible.XEP_0091_UTC_FORMAT| Constructor and Description |
|---|
DelayInfo(DelayInformation delay)
Creates a new instance with given delay information.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getElementName()
Returns the root element name.
|
java.lang.String |
getFrom()
Returns the JID of the entity that originally sent the packet or that delayed the
delivery of the packet or null if this information is not available.
|
java.lang.String |
getNamespace()
Returns the root element XML namespace.
|
java.lang.String |
getReason()
Returns a natural-language description of the reason for the delay or null if
this information is not available.
|
java.util.Date |
getStamp()
Returns the timestamp when the packet was originally sent.
|
void |
setFrom(java.lang.String from)
Sets the JID of the entity that originally sent the packet or that delayed the
delivery of the packet or null if this information is not available.
|
void |
setReason(java.lang.String reason)
Sets a natural-language description of the reason for the delay or null if
this information is not available.
|
java.lang.String |
toXML()
Returns the XML representation of the PacketExtension.
|
public DelayInfo(DelayInformation delay)
delay - the delay informationpublic java.lang.String getFrom()
DelayInformationgetFrom in class DelayInformationpublic java.lang.String getReason()
DelayInformationgetReason in class DelayInformationpublic java.util.Date getStamp()
DelayInformationgetStamp in class DelayInformationpublic void setFrom(java.lang.String from)
DelayInformationsetFrom in class DelayInformationfrom - the JID of the entity that originally sent the packet.public void setReason(java.lang.String reason)
DelayInformationsetReason in class DelayInformationreason - a natural-language description of the reason for the delay or null.public java.lang.String getElementName()
PacketExtensiongetElementName in interface PacketExtensiongetElementName in class DelayInformationpublic java.lang.String getNamespace()
PacketExtensiongetNamespace in interface PacketExtensiongetNamespace in class DelayInformationpublic java.lang.String toXML()
PacketExtensiontoXML in interface PacketExtensiontoXML in class DelayInformation