public class DelayInformation
extends java.lang.Object
implements org.jivesoftware.smack.packet.ExtensionElement
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
Constructor and Description |
---|
DelayInformation(java.util.Date stamp) |
DelayInformation(java.util.Date stamp,
java.lang.String from,
java.lang.String reason)
Creates a new instance with the specified timestamp.
|
Modifier and Type | Method and Description |
---|---|
static DelayInformation |
from(org.jivesoftware.smack.packet.Stanza packet)
Return delay information from the given stanza.
|
java.lang.String |
getElementName() |
java.lang.String |
getFrom()
Returns the JID of the entity that originally sent the stanza or that delayed the
delivery of the stanza or null if this information is not available.
|
static DelayInformation |
getFrom(org.jivesoftware.smack.packet.Stanza packet)
Deprecated.
use
from(Stanza) instead |
java.lang.String |
getNamespace() |
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 stanza was originally sent.
|
org.jivesoftware.smack.util.XmlStringBuilder |
toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) |
public static final java.lang.String ELEMENT
public static final java.lang.String NAMESPACE
public DelayInformation(java.util.Date stamp, java.lang.String from, java.lang.String reason)
stamp
- the timestampfrom
- senderreason
- reason of delay.public DelayInformation(java.util.Date stamp)
public java.lang.String getFrom()
public java.util.Date getStamp()
public java.lang.String getReason()
public java.lang.String getElementName()
getElementName
in interface org.jivesoftware.smack.packet.NamedElement
public java.lang.String getNamespace()
getNamespace
in interface org.jivesoftware.smack.packet.FullyQualifiedElement
public org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
toXML
in interface org.jivesoftware.smack.packet.Element
@Deprecated public static DelayInformation getFrom(org.jivesoftware.smack.packet.Stanza packet)
from(Stanza)
insteadpacket
- public static DelayInformation from(org.jivesoftware.smack.packet.Stanza packet)
packet
-