Package io.joynr.pubsub
Class SubscriptionQos
- java.lang.Object
-
- io.joynr.pubsub.SubscriptionQos
-
- All Implemented Interfaces:
JoynrType,Serializable
- Direct Known Subclasses:
MulticastSubscriptionQos,UnicastSubscriptionQos
public abstract class SubscriptionQos extends Object implements JoynrType
Base class representing the subscription quality of service settings.
This class stores quality of service settings used for subscriptions to attributes and broadcasts in generated proxy objects. The subscription will automatically expire after the expiry date is reached.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intIGNORE_VALUEstatic longINFINITE_SUBSCRIPTIONstatic longNO_EXPIRY_DATEExpiry date value to disable expiration: 0L.
-
Constructor Summary
Constructors Constructor Description SubscriptionQos()Default Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearExpiryDate()Resets the expiry date to the default value 0L (NO_EXPIRY_DATE).booleanequals(Object obj)Check for equalitylonggetExpiryDateMs()Get the end date of the subscription.inthashCode()Calculate code for hashing based on member contentsSubscriptionQossetExpiryDateMs(long expiryDateMs)Set the end date of the subscription, in milliseconds (since 1970-01-01T00:00:00.000 ).SubscriptionQossetValidityMs(long validityMs)Set how long the subscription should run for, in milliseconds.
-
-
-
Field Detail
-
IGNORE_VALUE
public static final int IGNORE_VALUE
- See Also:
- Constant Field Values
-
INFINITE_SUBSCRIPTION
public static final long INFINITE_SUBSCRIPTION
- See Also:
- Constant Field Values
-
NO_EXPIRY_DATE
public static final long NO_EXPIRY_DATE
Expiry date value to disable expiration: 0L.- See Also:
- Constant Field Values
-
-
Method Detail
-
getExpiryDateMs
public long getExpiryDateMs()
Get the end date of the subscription.
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.- Returns:
- the end date of the subscription.
This value is provided in milliseconds (since 1970-01-01T00:00:00.000).
-
setExpiryDateMs
public SubscriptionQos setExpiryDateMs(long expiryDateMs)
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.- 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 SubscriptionQos setValidityMs(long validityMs)
Set how long the subscription should run for, in milliseconds. This is a helper method that allows setting the expiryDate using a relative time.- Parameters:
validityMs- is the number of milliseconds until the subscription will expire- Returns:
- the subscriptionQos (fluent interface)
-
clearExpiryDate
public void clearExpiryDate()
Resets the expiry date to the default value 0L (NO_EXPIRY_DATE).
-
hashCode
public int hashCode()
Calculate code for hashing based on member contents
-
-