Package org.jivesoftware.smackx.delay
Class DelayInformationManager
- java.lang.Object
-
- org.jivesoftware.smackx.delay.DelayInformationManager
-
public class DelayInformationManager extends java.lang.Object
Delayed Delivery (XEP-203).- See Also:
- Delayed Delivery (XEP-203)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LEGACY_DELAYED_DELIVERY_ELEMENT
static java.lang.String
LEGACY_DELAYED_DELIVERY_NAMESPACE
static javax.xml.namespace.QName
QNAME
-
Constructor Summary
Constructors Constructor Description DelayInformationManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DelayInformation
getDelayInformation(org.jivesoftware.smack.packet.Stanza packet)
Get Delayed Delivery information.static java.util.Date
getDelayTimestamp(org.jivesoftware.smack.packet.Stanza packet)
Get the Delayed Delivery timestamp ornull
.static DelayInformation
getLegacyDelayInformation(org.jivesoftware.smack.packet.Stanza packet)
Get Delayed Delivery information as defined in XEP-91static DelayInformation
getXep203DelayInformation(org.jivesoftware.smack.packet.Stanza packet)
Get Delayed Delivery information as defined in XEP-203static boolean
isDelayedStanza(org.jivesoftware.smack.packet.Stanza packet)
Check if the given stanza is a delayed stanza as of XEP-203.
-
-
-
Field Detail
-
LEGACY_DELAYED_DELIVERY_NAMESPACE
public static final java.lang.String LEGACY_DELAYED_DELIVERY_NAMESPACE
- See Also:
- Constant Field Values
-
LEGACY_DELAYED_DELIVERY_ELEMENT
public static final java.lang.String LEGACY_DELAYED_DELIVERY_ELEMENT
- See Also:
- Constant Field Values
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
-
Method Detail
-
getXep203DelayInformation
public static DelayInformation getXep203DelayInformation(org.jivesoftware.smack.packet.Stanza packet)
Get Delayed Delivery information as defined in XEP-203Prefer
getDelayInformation(Stanza)
over this method for backwards compatibility.- Parameters:
packet
- TODO javadoc me please- Returns:
- the Delayed Delivery information or
null
-
getLegacyDelayInformation
public static DelayInformation getLegacyDelayInformation(org.jivesoftware.smack.packet.Stanza packet)
Get Delayed Delivery information as defined in XEP-91Prefer
getDelayInformation(Stanza)
over this method for backwards compatibility.- Parameters:
packet
- TODO javadoc me please- Returns:
- the Delayed Delivery information or
null
-
getDelayInformation
public static DelayInformation getDelayInformation(org.jivesoftware.smack.packet.Stanza packet)
Get Delayed Delivery information. This method first looks for a PacketExtension with the XEP-203 namespace and falls back to the XEP-91 namespace.- Parameters:
packet
- TODO javadoc me please- Returns:
- the Delayed Delivery information or
null
-
getDelayTimestamp
public static java.util.Date getDelayTimestamp(org.jivesoftware.smack.packet.Stanza packet)
Get the Delayed Delivery timestamp ornull
.- Parameters:
packet
- TODO javadoc me please- Returns:
- the Delayed Delivery timestamp or
null
-
isDelayedStanza
public static boolean isDelayedStanza(org.jivesoftware.smack.packet.Stanza packet)
Check if the given stanza is a delayed stanza as of XEP-203.- Parameters:
packet
- TODO javadoc me please- Returns:
- true if the stanza got delayed.
-
-