Package joynr

Class UnicastSubscriptionQos

    • Field Detail

      • MIN_PUBLICATION_TTL_MS

        protected static final long MIN_PUBLICATION_TTL_MS
        Minimum value for publicationTtl in milliseconds: 100.
        See Also:
        Constant Field Values
      • MAX_PUBLICATION_TTL_MS

        protected static final long MAX_PUBLICATION_TTL_MS
        Maximum value for publicationTtl in milliseconds: 2.592.000.000 (30 days).
        See Also:
        Constant Field Values
      • DEFAULT_PUBLICATION_TTL_MS

        protected static final long DEFAULT_PUBLICATION_TTL_MS
        Default value for publicationTtl in milliseconds: 10 000 (10 secs).
        See Also:
        Constant Field Values
    • Constructor Detail

      • UnicastSubscriptionQos

        public UnicastSubscriptionQos()
        Default Constructor
    • Method Detail

      • setExpiryDateMs

        public UnicastSubscriptionQos setExpiryDateMs​(long expiryDateMs)
        Description copied from class: SubscriptionQos
        Set the end date of the subscription, in milliseconds (since 1970-01-01T00:00:00.000 ). The publications will automatically expire at that date.
        The provider will send notifications until the expiry date is reached. You will not receive any notifications (neither value notifications nor missed publication notifications) after this date.
        Overrides:
        setExpiryDateMs in class SubscriptionQos
        Parameters:
        expiryDateMs - is the end date of the subscription.
        This value is provided in milliseconds (since 1970-01-01T00:00:00.000). 0L means NO_EXPIRY_DATE.
        Returns:
        the subscriptionQos (fluent interface)
      • setValidityMs

        public UnicastSubscriptionQos setValidityMs​(long validityMs)
        Description copied from class: SubscriptionQos
        Set how long the subscription should run for, in milliseconds. This is a helper method that allows setting the expiryDate using a relative time.
        Overrides:
        setValidityMs in class SubscriptionQos
        Parameters:
        validityMs - is the number of milliseconds until the subscription will expire
        Returns:
        the subscriptionQos (fluent interface)
      • getPublicationTtlMs

        public long getPublicationTtlMs()
        Get the time-to-live for notification messages.
        Notification messages will be sent with this time-to-live.

        If a notification message can not be delivered within its time to live, it will be deleted from the system. This value is provided in milliseconds.
        Returns:
        the publication time-to-live in milliseconds.
      • setPublicationTtlMs

        public SubscriptionQos setPublicationTtlMs​(long publicationTtlMs)
        Set the time-to-live for notification messages.
        Notification messages will be sent with this time-to-live. If a notification message can not be delivered within its time to live, it will be deleted from the system. This value is provided in milliseconds.
        Parameters:
        publicationTtlMs - publicationTtlMs time-to-live in milliseconds.

        Minimum, Maximum and Default Values:
        • Minimum publicationTtlMs = 100L. Smaller values will be rounded up.
        • Maximum publicationTtlMs = 2592000000L. Larger values will be rounded down.
        • Default publicationTtlMs = 10000L.
        Returns:
        the subscriptionQos (fluent interface)
      • hashCode

        public int hashCode()
        Description copied from class: SubscriptionQos
        Calculate code for hashing based on member contents
        Overrides:
        hashCode in class SubscriptionQos
        Returns:
        The calculated hash code
      • equals

        public boolean equals​(Object obj)
        Description copied from class: SubscriptionQos
        Check for equality
        Overrides:
        equals in class SubscriptionQos
        Parameters:
        obj - Reference to the object to compare to
        Returns:
        true, if objects are equal, false otherwise