Class DelayInformation
java.lang.Object
org.jivesoftware.smackx.delay.packet.DelayInformation
- All Implemented Interfaces:
org.jivesoftware.smack.packet.Element,org.jivesoftware.smack.packet.ExtensionElement,org.jivesoftware.smack.packet.NamedElement,org.jivesoftware.smack.packet.XmlElement,org.jivesoftware.smack.packet.XmlLangElement
public class DelayInformation
extends Object
implements org.jivesoftware.smack.packet.ExtensionElement
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDelayInformation(Date stamp) DelayInformation(Date stamp, String from, String reason) Creates a new instance with the specified timestamp. -
Method Summary
Modifier and TypeMethodDescriptionstatic DelayInformationfrom(org.jivesoftware.smack.packet.Stanza packet) Return delay information from the given stanza.getFrom()Returns the JID of the entity that originally sent the stanza or that delayed the delivery of the stanza ornullif this information is not available.static DelayInformationgetFrom(org.jivesoftware.smack.packet.Stanza packet) Deprecated.Returns a natural-language description of the reason for the delay ornullif this information is not available.getStamp()Returns the timestamp when the stanza was originally sent.org.jivesoftware.smack.util.XmlStringBuildertoXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jivesoftware.smack.packet.Element
toXML, toXMLMethods 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 ornullif 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 ornullif this information is not available.- Returns:
- a natural-language description of the reason for the delay or
null.
-
getElementName
- Specified by:
getElementNamein interfaceorg.jivesoftware.smack.packet.NamedElement
-
getNamespace
- Specified by:
getNamespacein interfaceorg.jivesoftware.smack.packet.XmlElement
-
toXML
public org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) - Specified by:
toXMLin interfaceorg.jivesoftware.smack.packet.Element
-
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