Notification represents a single notification to be sent to a client. It is identified by the uniqueId passed into the constructor. Methods are provided for setting field access. More...
Public Member Functions | |
virtual string | GetField (string name) |
Notification (string uniqueId) | |
virtual void | SetField (string name, string value) |
virtual void | SetFields (IDictionary< string, string > fieldMap) |
override string | ToString () |
Public Attributes | |
Caplin.XLang.Container.Item | internalItem |
Properties | |
virtual IDictionary< string, string > | Fields [get] |
virtual string | UniqueId [get] |
Notification represents a single notification to be sent to a client. It is identified by the uniqueId passed into the constructor. Methods are provided for setting field access.
Notifications are passed into the INotificationChannel.SendNotification(Notification ) and INotificationChannel.SendNotifications methods on the INotificationChannel received on INotificationApplicationListener callbacks.
The uniqueId is used in the subject in place of the 'i' in the '/PRIVATE/NOTIFICATIONS/DATASOURCES/u/NOTIFY/[sourceName]-i' notification namespace to create the record subject for this Notification. These notifications will be received by any listeners registered with a StreamLink Alerts API's NotificationService whereupon the uniqueId can be extracted.
When the Notification is sent on the INotificationChannel three fields are added to the notification. They include NotificationId, NotificationSource and NotificationTime. The NotificationSource is the source name that has been configured on the NotificationProvider. The NotificationId is set to "[source-name]-[uniqueId-of-notification]". The NotificationTime field will be set to the time in millis since 1970/01/01 at which the Notification is sent, however if this field has been set already using Notification.tField(string , string ) then this set will be respected and the fields value won't be automatically replaced.
|
inline |
uniqueId | Unique identifier for this Notification. This id is used when removing items from the INotificationChannel |
and in the callback in INotificationChannelListener.
|
inlinevirtual |
name | Key associated with a value. |
|
inlinevirtual |
name | Field name associate with a value. These must be present in the fields.conf used to configure the DataSource. |
value | Value to send associated with this field name. |
|
inlinevirtual |
fieldMap | Map of fields and values for this Notification. The field names must be present in the fields.conf used to configure the DataSource. |
|
inline |
String containing this Notification's uniqueId and fields.
|
get |
A map containing all fields present on this Notification.
|
get |
uniqueId The uniqueId this Notification was instantiated with.