Class TimeUntilDisconnectNotification


  • public final class TimeUntilDisconnectNotification
    extends Object
    Contains all information about a device that is indicating being ready to receive an upstream message.
    • Method Detail

      • getTenantId

        public String getTenantId()
        Gets the identifier of the tenant that the device belongs to.
        Returns:
        The identifier.
      • getDeviceId

        public String getDeviceId()
        Gets the identifier of the device that sent the TTD.
        Returns:
        The identifier.
      • getTenantAndDeviceId

        public String getTenantAndDeviceId()
        Get a representation of the deviceId scoped to the tenant.
        Returns:
        The combined representation, or null if the tenantId is null.
      • getTtd

        public Integer getTtd()
        Gets the time period that the device indicated to remain connected.
        Returns:
        The time period in seconds.
      • getReadyUntil

        public Instant getReadyUntil()
        Gets the point in time until which the device will remain connected.
        Returns:
        The point in time.
      • getCreationTime

        public Instant getCreationTime()
        Gets the point in time that the message has been created at.
        Returns:
        The creation time.
      • getMillisecondsUntilExpiry

        public long getMillisecondsUntilExpiry()
        Get the time in milliseconds left from the current time until this notification expires.
        Returns:
        The number of milliseconds until this notification expires, or 0 if the notification is already expired.