public class DelayInformation extends Object implements ExtensionElement
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT |
static String |
NAMESPACE |
Constructor and Description |
---|
DelayInformation(Date stamp) |
DelayInformation(Date stamp,
String from,
String reason)
Creates a new instance with the specified timestamp.
|
Modifier and Type | Method and Description |
---|---|
static DelayInformation |
from(Stanza packet)
Return delay information from the given stanza.
|
String |
getElementName()
Returns the root element name.
|
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(Stanza packet)
Deprecated.
use
from(Stanza) instead |
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 stanza was originally sent.
|
XmlStringBuilder |
toXML(String enclosingNamespace)
Returns the XML representation of this Element.
|
public static final String ELEMENT
public static final String NAMESPACE
public DelayInformation(Date stamp, String from, String reason)
stamp
- the timestampfrom
- senderreason
- reason of delay.public DelayInformation(Date stamp)
public String getFrom()
public Date getStamp()
public String getReason()
public String getElementName()
NamedElement
getElementName
in interface NamedElement
public String getNamespace()
ExtensionElement
getNamespace
in interface ExtensionElement
public XmlStringBuilder toXML(String enclosingNamespace)
Element
@Deprecated public static DelayInformation getFrom(Stanza packet)
from(Stanza)
insteadpacket
- public static DelayInformation from(Stanza packet)
packet
-