public final class DelayedDelivery extends Object
<delay/> element in the urn:xmpp:delay namespace.
This class is immutable.The XML namespace defined herein is used to provide timestamp information about data stored for later delivery. The most common uses of this namespace are to stamp:
- A message that is sent to an offline entity and stored for later delivery (see Best Practices for Handling Offline Messages).
- The last available presence stanza sent by a connected client to a server.
- Messages cached by a Multi-User Chat room for delivery to new participants when they join the room.
| Constructor and Description |
|---|
DelayedDelivery(Instant timestamp)
Creates a element with only a timestamp attribute.
|
DelayedDelivery(Instant timestamp,
Jid from,
String reason)
Creates a delayed delivery element with all attributes.
|
| Modifier and Type | Method and Description |
|---|---|
Jid |
getFrom()
Gets the Jabber ID of the entity that originally sent the XML stanza or that delayed the delivery of the stanza (e.g., the address of a multi-user chat room).
|
String |
getReason()
Gets the natural-language description of the reason for the delay.
|
Instant |
getTimeStamp()
Gets the time when the XML stanza was originally sent.
|
static Instant |
sendDate(Stanza stanza)
Gets the original send date of a stanza, i.e.
|
String |
toString() |
public static final String NAMESPACE
public DelayedDelivery(Instant timestamp)
timestamp - The timestamp.public static Instant sendDate(Stanza stanza)
Instant.now(), if no delayed deliver information is available or the timestamp of delayed delivery.stanza - The stanza.Instant.now().public final Jid getFrom()
public final Instant getTimeStamp()
public final String getReason()
Copyright © 2014–2018 XMPP.rocks. All rights reserved.