Class StaleDeviceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.jivesoftware.smackx.omemo.exceptions.StaleDeviceException
-
- All Implemented Interfaces:
java.io.Serializable
public class StaleDeviceException extends java.lang.Exception
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StaleDeviceException(OmemoDevice device, java.util.Date lastMessageDate, java.util.Date lastDeviceIdPublicationDate)This exception gets thrown if a message cannot be encrypted for a device due to the device being inactive for too long (stale).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OmemoDevicegetDevice()Return the stale OMEMO device.java.util.DategetLastDeviceIdPublicationDate()Return the date of the last time the deviceId was republished after being inactive/non-existent before.java.util.DategetLastMessageDate()Return the date on which the last OMEMO message sent from the device was received.
-
-
-
Constructor Detail
-
StaleDeviceException
public StaleDeviceException(OmemoDevice device, java.util.Date lastMessageDate, java.util.Date lastDeviceIdPublicationDate)
This exception gets thrown if a message cannot be encrypted for a device due to the device being inactive for too long (stale).- Parameters:
device- OmemoDevice.lastMessageDate- date of the last received message from the device.lastDeviceIdPublicationDate- date on which the device ID was last published via pubsub.
-
-
Method Detail
-
getLastMessageDate
public java.util.Date getLastMessageDate()
Return the date on which the last OMEMO message sent from the device was received.- Returns:
- last messages date
-
getLastDeviceIdPublicationDate
public java.util.Date getLastDeviceIdPublicationDate()
Return the date of the last time the deviceId was republished after being inactive/non-existent before.- Returns:
- date of last deviceId (re)publication.
-
getDevice
public OmemoDevice getDevice()
Return the stale OMEMO device.- Returns:
- stale device
-
-