Class StaleDeviceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.jivesoftware.smackx.omemo.exceptions.StaleDeviceException
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorDescriptionStaleDeviceException
(OmemoDevice device, Date lastMessageDate, 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
Modifier and TypeMethodDescriptionReturn the stale OMEMO device.Return the date of the last time the deviceId was republished after being inactive/non-existent before.Return the date on which the last OMEMO message sent from the device was received.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StaleDeviceException
public StaleDeviceException(OmemoDevice device, Date lastMessageDate, 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 Details
-
getLastMessageDate
Return the date on which the last OMEMO message sent from the device was received.- Returns:
- last messages 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
Return the stale OMEMO device.- Returns:
- stale device
-