Lightstreamer .Net Adapter 1.10.0
ContentsIndexHome
PreviousUpNext
IMetadataProvider.NotifyMpnSubscriptionActivation Method

Called by Lightstreamer Kernel to check that a User is enabled to activate a Push Notification subscription. If the check succeeds, this also notifies the Metadata Adapter that Push Notifications are being activated.  

Take particular precautions when authorizing subscriptions, if possible check for validity the trigger expression reported by MpnSubscriptionInfo.Trigger, as it may contain maliciously crafted code. The MPN notifiers configuration file contains a first-line validation mechanism based on regular expression that may also be used for this purpose.  

Push Notifications are not supported in Moderato edition.

C++
void NotifyMpnSubscriptionActivation(string user, string sessionID, TableInfo table, MpnSubscriptionInfo mpnSubscription);
C#
void NotifyMpnSubscriptionActivation(string user, string sessionID, TableInfo table, MpnSubscriptionInfo mpnSubscription);
Visual Basic
Function NotifyMpnSubscriptionActivation(user As string, sessionID As string, table As TableInfo, mpnSubscription As MpnSubscriptionInfo) As void
Parameters 
Description 
string user 
A User name. 
string sessionID 
The ID of a Session owned by the User. The session ID is provided for a thorough validation of the Table informations, but Push Notification subscriptions are persistent and survive the session. Thus, any association between this Session ID and this Push Notification subscription should be considered temporary. 
TableInfo table 
A TableInfo instance, containing the details of a Table (i.e.: Subscription) for which Push Notification have to be activated. 
MpnSubscriptionInfo mpnSubscription 
An MpnSubscriptionInfo instance, containing the details of a Push Notification to be activated. Platform specific details may be accessed by casting the class to the platform's specific subclass (i.e. MpnApnsSubscriptionInfo, etc.). 
Exceptions 
Description 
if the User is not allowed to activate the specified Push Notification in the Session. 
if something is wrong in the parameters, such as inconsistent information about a Table (i.e.: Subscription) or a Push Notification.