Package joynr
Class UnicastSubscriptionQos
- java.lang.Object
-
- io.joynr.pubsub.SubscriptionQos
-
- joynr.UnicastSubscriptionQos
-
- All Implemented Interfaces:
JoynrType,Serializable
- Direct Known Subclasses:
OnChangeSubscriptionQos,PeriodicSubscriptionQos
public class UnicastSubscriptionQos extends SubscriptionQos
Class representing the quality of service settings for non-selective broadcasts- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static longDEFAULT_PUBLICATION_TTL_MSDefault value for publicationTtl in milliseconds: 10 000 (10 secs).protected static longMAX_PUBLICATION_TTL_MSMaximum value for publicationTtl in milliseconds: 2.592.000.000 (30 days).protected static longMIN_PUBLICATION_TTL_MSMinimum value for publicationTtl in milliseconds: 100.-
Fields inherited from class io.joynr.pubsub.SubscriptionQos
IGNORE_VALUE, INFINITE_SUBSCRIPTION, NO_EXPIRY_DATE
-
-
Constructor Summary
Constructors Constructor Description UnicastSubscriptionQos()Default Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Check for equalitylonggetPublicationTtlMs()Get the time-to-live for notification messages.inthashCode()Calculate code for hashing based on member contentsUnicastSubscriptionQossetExpiryDateMs(long expiryDateMs)Set the end date of the subscription, in milliseconds (since 1970-01-01T00:00:00.000 ).SubscriptionQossetPublicationTtlMs(long publicationTtlMs)Set the time-to-live for notification messages.UnicastSubscriptionQossetValidityMs(long validityMs)Set how long the subscription should run for, in milliseconds.-
Methods inherited from class io.joynr.pubsub.SubscriptionQos
clearExpiryDate, getExpiryDateMs
-
-
-
-
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
-
-
Method Detail
-
setExpiryDateMs
public UnicastSubscriptionQos setExpiryDateMs(long expiryDateMs)
Description copied from class:SubscriptionQosSet 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:
setExpiryDateMsin classSubscriptionQos- 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:SubscriptionQosSet how long the subscription should run for, in milliseconds. This is a helper method that allows setting the expiryDate using a relative time.- Overrides:
setValidityMsin classSubscriptionQos- 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:SubscriptionQosCalculate code for hashing based on member contents- Overrides:
hashCodein classSubscriptionQos- Returns:
- The calculated hash code
-
equals
public boolean equals(Object obj)
Description copied from class:SubscriptionQosCheck for equality- Overrides:
equalsin classSubscriptionQos- Parameters:
obj- Reference to the object to compare to- Returns:
- true, if objects are equal, false otherwise
-
-