Class MpnSubscriptionInfo
java.lang.Object
com.lightstreamer.interfaces.metadata.MpnSubscriptionInfo
Specifies a Push Notifications subscription, used with MPN-related requests of the
For the actual description of the subscription we rely on a generic descriptor accessible via the
Edition Note:
Push Notifications is an optional feature, available depending on Edition and License Type. To know what features are enabled by your license, please see the License tab of the Monitoring Dashboard (by default, available at /dashboard).
MetadataProvider
.
For the actual description of the subscription we rely on a generic descriptor accessible via the
getNotificationFormat()
getter, where the structure of the descriptor depends on the platform.
Edition Note:
Push Notifications is an optional feature, available depending on Edition and License Type. To know what features are enabled by your license, please see the License tab of the Monitoring Dashboard (by default, available at /dashboard).
-
Constructor Summary
ConstructorDescriptionMpnSubscriptionInfo
(MpnDeviceInfo device, String notification, String trigger) Used by Lightstreamer to create a MpnSubscriptionInfo instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.Returns the MPN device of this subscription.Returns the descriptor of the push notifications format of this subscription.Returns the optional expression that triggers the delivery of push notification.int
hashCode()
Returns a hash code value for the object.toString()
Returns a string representation of the MpnSubscriptionInfo.
-
Constructor Details
-
MpnSubscriptionInfo
public MpnSubscriptionInfo(@Nonnull MpnDeviceInfo device, @Nonnull String notification, @Nonnull String trigger) Used by Lightstreamer to create a MpnSubscriptionInfo instance.- Parameters:
device
- the MPN device of this subscription.notification
- the descriptor of the push notifications format.trigger
- the optional expression that triggers the delivery of push notification.
-
-
Method Details
-
getDevice
Returns the MPN device of this subscription.- Returns:
- the MPN device of this subscription.
-
getNotificationFormat
Returns the descriptor of the push notifications format of this subscription.
The structure of the format descriptor depends on the platform type and it is represented in json.- Returns:
- a descriptor of the push notifications format in json.
-
getTrigger
Returns the optional expression that triggers the delivery of push notification.- Returns:
- a trigger expression, or null if not specified.
-
toString
Returns a string representation of the MpnSubscriptionInfo. An MpnSubscriptionInfo object is represented by its three properties device, trigger and notification format, prefixed by their name and on separate lines. E.g.:device=Apple/com.lightstreamer.ios.stocklist/8fac[...]fe12\n trigger=Double.parseDouble(${last_price}) >= 50.0\n notificationFormat={aps={badge=AUTO, alert=Price is over 50$, sound=Default}}\n
-
equals
Indicates whether some other object is "equal to" this one. Two MpnSubscriptionInfo objects are equal if their three properties are equal. -
hashCode
public int hashCode()Returns a hash code value for the object.
-