Class DelayInformation
java.lang.Object
org.jivesoftware.smackx.delay.packet.DelayInformation
- All Implemented Interfaces:
Element
,ExtensionElement
,NamedElement
,XmlElement
,XmlLangElement
Represents timestamp information about data stored for later delivery. A DelayInformation will
always includes the timestamp when the stanza was originally sent and may include more
information such as the JID of the entity that originally sent the stanza as well as the reason
for the delay.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDelayInformation
(Date stamp) DelayInformation
(Date stamp, String from, String reason) Creates a new instance with the specified timestamp. -
Method Summary
Modifier and TypeMethodDescriptionstatic DelayInformation
Return delay information from the given stanza.Returns the root element name.getFrom()
Returns the JID of the entity that originally sent the stanza or that delayed the delivery of the stanza ornull
if this information is not available.static DelayInformation
Deprecated.Returns the root element XML namespace.Returns a natural-language description of the reason for the delay ornull
if this information is not available.getStamp()
Returns the timestamp when the stanza was originally sent.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.XmlElement
getLanguage, getQName
-
Field Details
-
ELEMENT
- See Also:
-
NAMESPACE
- See Also:
-
QNAME
-
-
Constructor Details
-
DelayInformation
Creates a new instance with the specified timestamp.- Parameters:
stamp
- the timestampfrom
- senderreason
- reason of delay.
-
DelayInformation
-
-
Method Details
-
getFrom
Returns the JID of the entity that originally sent the stanza or that delayed the delivery of the stanza ornull
if this information is not available.- Returns:
- the JID of the entity that originally sent the stanza or that delayed the delivery of the packet.
-
getStamp
Returns the timestamp when the stanza was originally sent. The returned Date is be understood as UTC.- Returns:
- the timestamp when the stanza was originally sent.
-
getReason
Returns a natural-language description of the reason for the delay ornull
if this information is not available.- Returns:
- a natural-language description of the reason for the delay or
null
.
-
getElementName
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
Description copied from interface:XmlElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceXmlElement
- Returns:
- the namespace.
-
toXML
-
getFrom
Deprecated.usefrom(Stanza)
insteadReturn delay information from the given stanza.- Parameters:
packet
- TODO javadoc me please- Returns:
- the DelayInformation or null
-
from
Return delay information from the given stanza.- Parameters:
packet
- TODO javadoc me please- Returns:
- the DelayInformation or null
-
from(Stanza)
instead