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 |
---|---|
String |
getElementName()
Returns the root element name.
|
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.
|
String |
getNamespace()
Returns the root element XML namespace.
|
String |
getReason()
Returns a natural-language description of the reason for the delay or null if
this information is not available.
|
Date |
getStamp()
Returns the timestamp when the packet was originally sent.
|
void |
setFrom(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(String reason)
Sets a natural-language description of the reason for the delay or null if
this information is not available.
|
String |
toXML()
Returns the XML representation of the PacketExtension.
|
public DelayInfo(DelayInformation delay)
delay
- the delay informationpublic String getFrom()
DelayInformation
getFrom
in class DelayInformation
public String getReason()
DelayInformation
getReason
in class DelayInformation
public Date getStamp()
DelayInformation
getStamp
in class DelayInformation
public void setFrom(String from)
DelayInformation
setFrom
in class DelayInformation
from
- the JID of the entity that originally sent the packet.public void setReason(String reason)
DelayInformation
setReason
in class DelayInformation
reason
- a natural-language description of the reason for the delay or null.public String getElementName()
PacketExtension
getElementName
in interface PacketExtension
getElementName
in class DelayInformation
public String getNamespace()
PacketExtension
getNamespace
in interface PacketExtension
getNamespace
in class DelayInformation
public String toXML()
PacketExtension
toXML
in interface PacketExtension
toXML
in class DelayInformation