Package com.lightstreamer.jmx
Interface PushNotificationsMBean
-
public interface PushNotificationsMBean
At most one PushNotificationsMBean instance exists in the system, to provide information on the activity of the internal MPN Module. It is created at startup by Lightstreamer Server only when the MPN Module, which accomplishes the Push Notification service, is enabled; then it lasts until the shutdown of the Server.
PushNotificationsMBean name:
"com.lightstreamer:type=PushNotifications"- Unavailability Note:
- MPN is currently not available.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Boolean
deleteMPNDevice(java.lang.String deviceId)
Stops managing a specified MPN Device that is currently served by the Push Notification service in this Server instance.java.lang.Long
getCumulFilteredEvents()
java.lang.Long
getCumulPushNotificationBytes()
java.lang.Long
getCumulPushNotifications()
java.lang.String
getCurrentMPNDevice(java.lang.String platformType, java.lang.String applicationId, java.lang.String deviceToken)
java.util.List<java.lang.String>
getCurrentMPNDeviceList()
java.lang.Integer
getCurrentMPNDevices()
java.lang.Double
getCurrentPushNotificationThroughputKbps()
java.lang.Integer
getDeviceHandlerPoolQueue()
java.lang.Integer
getMaxMPNDevices()
java.lang.Double
getMaxPushNotificationFrequency()
java.lang.Double
getMaxPushNotificationThroughputKbps()
java.lang.String
getMPNDeviceApplicationId(java.lang.String deviceId)
java.lang.String
getMPNDevicePlatformType(java.lang.String deviceId)
java.lang.String
getMPNDeviceToken(java.lang.String deviceId)
java.lang.Integer
getNewFilteredEvents()
java.lang.Integer
getNewStartedMPNDevices()
java.lang.Integer
getNewTerminatedMPNDevices()
java.lang.Double
getPushNotificationFrequency()
-
-
-
Method Detail
-
getCurrentMPNDevices
java.lang.Integer getCurrentMPNDevices()
- Returns:
- The number of currently served MPN Devices.
Actually, multiple apps can request Push Notifications for the same physical device; here, by MPN Device we mean the combination of a physical device and an app.
-
getCurrentMPNDeviceList
java.util.List<java.lang.String> getCurrentMPNDeviceList()
- Returns:
- The list of currently served MPN Devices. Expressed as an ArrayList of Strings, where each String contains an identifier for the MPN Device.
- See Also:
getCurrentMPNDevices()
-
getMaxMPNDevices
java.lang.Integer getMaxMPNDevices()
- Returns:
- The maximum number of concurrently served MPN Devices reached in the life of the Server.
- See Also:
getCurrentMPNDevices()
-
getNewStartedMPNDevices
java.lang.Integer getNewStartedMPNDevices()
- Returns:
- The number of MPN Devices whose service has started in the last sampling period.
- See Also:
getCurrentMPNDevices()
-
getNewTerminatedMPNDevices
java.lang.Integer getNewTerminatedMPNDevices()
- Returns:
- The number of MPN Devices whose service has terminated in the last sampling period.
- See Also:
getCurrentMPNDevices()
-
getCumulPushNotificationBytes
java.lang.Long getCumulPushNotificationBytes()
- Returns:
- The total (cumulative) number of bytes related with Push Notifications submitted to the notifier services in the life of the Server. The count only includes the notification payload.
-
getCumulPushNotifications
java.lang.Long getCumulPushNotifications()
- Returns:
- The total (cumulative) number of Push Notifications sent in the life of the Server.
-
getPushNotificationFrequency
java.lang.Double getPushNotificationFrequency()
- Returns:
- The frequency of Push Notifications sent in the last sampling period. It is expressed as notifications per second; the value has a three decimal precision.
-
getMaxPushNotificationFrequency
java.lang.Double getMaxPushNotificationFrequency()
- Returns:
- The maximum frequency of Push Notifications reached in the life of the Server. It is expressed as notifications per second; the value has a three decimal precision.
-
getCurrentPushNotificationThroughputKbps
java.lang.Double getCurrentPushNotificationThroughputKbps()
- Returns:
- The current global throughput (measured in the last sampling period) related to the submission of Push Notifications to the proper notifier services. The count only includes the notification payload. It is expressed as Kilobits per second; the value has a three decimal precision.
-
getMaxPushNotificationThroughputKbps
java.lang.Double getMaxPushNotificationThroughputKbps()
- Returns:
- The maximum global throughput (occurred in the life of the Server) related to the submission of Push Notifications to the proper notifier services. The count only includes the notification payload. It is expressed as Kilobits per second; the value has a three decimal precision.
-
getNewFilteredEvents
java.lang.Integer getNewFilteredEvents()
- Returns:
- The number of filtered events occurred while serving MPN Devices in the last sampling period. Events discarded because of the application of a "trigger" are also included in this count.
-
getCumulFilteredEvents
java.lang.Long getCumulFilteredEvents()
- Returns:
- The total (cumulative) number of filtered events occurred while serving MPN Devices in the life of the Server. Events discarded because of the application of a "trigger" are also included in this count.
-
getDeviceHandlerPoolQueue
java.lang.Integer getDeviceHandlerPoolQueue()
- Returns:
- The length of the queue of the tasks waiting to be processed by the optional pool that can be assigned for performing subscriptions and unsubscriptions internally originated by the Push Notification service. If a specific pool is not assigned, these operations are managed by either the Data Adapter specific pool or the SERVER pool; in this case, -1 is returned.
-
getCurrentMPNDevice
java.lang.String getCurrentMPNDevice(java.lang.String platformType, java.lang.String applicationId, java.lang.String deviceToken)
- Parameters:
platformType
- specifies a push notifications platform type. See the PlatformType class in the Metadata Adapter interface specifications for details on the available names.applicationId
- the app ID, also known as the bundle ID. The domain of Application IDs is determined by the Platform.deviceToken
- the token of the device receiving the push notifications. The domain of Device Tokens is determined by the Platform and possibly by the Application.- Returns:
- An identifier for an MPN Device whose properties match the supplied ones, or null if none of the MPN Devices currently served by the Push Notification service on this Server instance matches all the properties. If a MPN Device is found, it is guaranteed to be the only one MPN Device currently served on this Server instance that matches all the properties.
-
getMPNDevicePlatformType
java.lang.String getMPNDevicePlatformType(java.lang.String deviceId)
- Parameters:
deviceId
- an identifier, as returned fromgetCurrentMPNDeviceList()
orgetCurrentMPNDevice(java.lang.String, java.lang.String, java.lang.String)
.- Returns:
- The Platform associated with the MPN Device specified through
the supplied identifier, or null if none of the MPN Devices currently
served by the Push Notification service on this Server instance
corresponds to the supplied identifier.
The returned value is the name of one of the Platforms supported by the Push Notification service. See the PlatformType class in the Metadata Adapter interface specifications for details on the available names.
-
getMPNDeviceApplicationId
java.lang.String getMPNDeviceApplicationId(java.lang.String deviceId)
- Parameters:
deviceId
- an identifier, as returned fromgetCurrentMPNDeviceList()
orgetCurrentMPNDevice(java.lang.String, java.lang.String, java.lang.String)
.- Returns:
- The ID of the Application associated with the MPN Device specified through
the supplied identifier, or null if none of the MPN Devices currently
served by the Push Notification service on this Server instance
corresponds to the supplied identifier.
The domain of Application IDs is determined by the Platform.
-
getMPNDeviceToken
java.lang.String getMPNDeviceToken(java.lang.String deviceId)
- Parameters:
deviceId
- an identifier, as returned fromgetCurrentMPNDeviceList()
orgetCurrentMPNDevice(java.lang.String, java.lang.String, java.lang.String)
.- Returns:
- The Device Token associated with the MPN Device specified through
the supplied identifier, or null if none of the MPN Devices currently
served by the Push Notification service on this Server instance
corresponds to the supplied identifier.
The domain of Device Tokens is determined by the Platform and possibly by the Application.
-
deleteMPNDevice
java.lang.Boolean deleteMPNDevice(java.lang.String deviceId)
Stops managing a specified MPN Device that is currently served by the Push Notification service in this Server instance. As a consequence, all related subscriptions will be discarded and will no longer be managed by this or other instances.
Note that further client requests, if allowed by the Metadata Adapter, may cause the same MPN Device to be managed again.- Parameters:
deviceId
- an identifier, as returned fromgetCurrentMPNDeviceList()
orgetCurrentMPNDevice(java.lang.String, java.lang.String, java.lang.String)
.- Returns:
- True if operation succeeded. False if operation failed.
-
-