Class MpnDeviceInfo
java.lang.Object
com.lightstreamer.adapters.remote.MpnDeviceInfo
Specifies a target device for Push Notifications, used with MPN-related requests for the
Note that the processing and the authorization of Push Notifications is per-device and per-application. While a physical device is uniquely identified by the platform type and a platform dependent device token, Lightstreamer considers the same device used by two different applications as two different MPN devices. Thus, an MpnDeviceInfo instance uniquely identifies both the physical device and the application for which it is being used.
An MpnDeviceInfo always provides the following identifiers:
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
.
Note that the processing and the authorization of Push Notifications is per-device and per-application. While a physical device is uniquely identified by the platform type and a platform dependent device token, Lightstreamer considers the same device used by two different applications as two different MPN devices. Thus, an MpnDeviceInfo instance uniquely identifies both the physical device and the application for which it is being used.
An MpnDeviceInfo always provides the following identifiers:
- The platform type.
- The application ID.
- The device token.
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
ConstructorDescriptionMpnDeviceInfo
(MpnPlatformType type, String applicationId, String deviceToken) Used by Lightstreamer to provide a MpnDeviceInfo instance to the MPN-related methods. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.final String
Returns the application ID, also known as the package name or bundle ID on some platforms.final String
Returns the token of the device, also know as the registration ID on some platforms.final MpnPlatformType
getType()
Returns the platform type of the device.int
hashCode()
Returns a hash code value for the object.toString()
Returns a string representation of the MpnDeviceInfo.
-
Constructor Details
-
MpnDeviceInfo
public MpnDeviceInfo(@Nonnull MpnPlatformType type, @Nonnull String applicationId, @Nonnull String deviceToken) Used by Lightstreamer to provide a MpnDeviceInfo instance to the MPN-related methods.- Parameters:
type
- Platform type of the device.applicationId
- The app ID, also known as the bundle ID on some platforms.deviceToken
- The token of the device.
-
-
Method Details
-
getType
Returns the platform type of the device.- Returns:
- a platform type.
-
getApplicationId
Returns the application ID, also known as the package name or bundle ID on some platforms.- Returns:
- an application ID
-
getDeviceToken
Returns the token of the device, also know as the registration ID on some platforms.- Returns:
- a device token.
-
toString
Returns a string representation of the MpnDeviceInfo. An MpnDeviceInfo object is represented by a juxtaposition of its three properties platform type, application ID and device token, separated by a single "/" character. E.g.:Apple/com.lightstreamer.ios.stocklist/8fac[...]fe12
-
equals
Indicates whether some other object is "equal to" this one. Two MpnDeviceInfo objects are equal if their three properties are equal. -
hashCode
public int hashCode()Returns a hash code value for the object.
-