The NotificationChannel is a notification communication channel associated with a particular user. It allows your application to add and remove Notifications for a user which will be received by a front end application. More...
Public Member Functions | |
void | CloseChannel () |
Closes the channel. More... | |
void | RemoveNotification (string uniqueId) |
Removes the Notification from the internal cache and sends a container remove so that this notification is no longer requested when the channel is subscribed to. More... | |
void | RemoveNotifications (IList< string > uniqueIds) |
Removes Notifications from the internal cache and sends a container remove so that these notifications are no longer requested when the channel is subscribed to. More... | |
void | SendEmptyNotificationContainer () |
Sends an empty container on the channel. More... | |
void | SendNotification (Caplin.DataSource.Notification.Notification notification) |
Adds the Notification to the internal cache and sends a container add so that this notification is requested when the channel is subscribed to. More... | |
void | SendNotificationContainerStatusOk () |
Sends a status ok on the channel. More... | |
void | SendNotificationContainerStatusStale () |
Sends a status stale on the channel. More... | |
void | SendNotificationNotFound (string uniqueId) |
Sends a not found for a Notification. More... | |
void | SendNotifications (IList< Caplin.DataSource.Notification.Notification > items) |
Adds Notifications to the internal cache and sends a container add so that these items are requested when the channel is subscribed to. More... | |
void | SendNotificationStatusOk (string uniqueId) |
Send status ok for a Notification. More... | |
void | SendNotificationStatusStale (string uniqueId) |
Send status stale for a Notification. More... | |
void | SetNotificationChannelListener (Caplin.DataSource.Notification.INotificationChannelListener listener) |
Your application SHOULD set a INotificationChannelListener on the channel. On this listener, your application will receive callbacks on requests for Notifications not in the cache and when a front-end client sends actions in response to the notification. More... | |
Properties | |
string | Subject [get] |
Returns the subject for the channel. More... | |
string | Username [get] |
Returns the username for the channel More... | |
The NotificationChannel is a notification communication channel associated with a particular user. It allows your application to add and remove Notifications for a user which will be received by a front end application.
The channel caches all sent messages and handles requests for cached Notifications automatically. When a notification is removed, it is removed from the cache and the user is automatically unsubscribed from it. It enters your application through the INotificationApplicationListener.NotificationChannelOpened callback.
void Caplin.DataSource.Notification.INotificationChannel.CloseChannel | ( | ) |
Closes the channel.
Sends a Subject Not Found on the channel's subject to let subscribers know that it is no longer serviced.
void Caplin.DataSource.Notification.INotificationChannel.RemoveNotification | ( | string | uniqueId | ) |
Removes the Notification from the internal cache and sends a container remove so that this notification is no longer requested when the channel is subscribed to.
uniqueId | of the item to remove |
void Caplin.DataSource.Notification.INotificationChannel.RemoveNotifications | ( | IList< string > | uniqueIds | ) |
Removes Notifications from the internal cache and sends a container remove so that these notifications are no longer requested when the channel is subscribed to.
uniqueIds | of the items to remove |
void Caplin.DataSource.Notification.INotificationChannel.SendEmptyNotificationContainer | ( | ) |
Sends an empty container on the channel.
Invoke when a INotificationApplicationListener.NotificationChannelOpened callback is received and there are currently no Notifications to be added for the channel. I.e. A INotificationApplicationListener.NotificationChannelOpened for a historic trade data NotificationChannel for a user who has not yet traded would be serviced with this method.
void Caplin.DataSource.Notification.INotificationChannel.SendNotification | ( | Caplin.DataSource.Notification.Notification | notification | ) |
Adds the Notification to the internal cache and sends a container add so that this notification is requested when the channel is subscribed to.
If an notification with the same unique id already exists in the internal cache then that item's fields will be updated with this one's. This will then trigger an update for any users currently subscribed to this item.
notification | to send |
void Caplin.DataSource.Notification.INotificationChannel.SendNotificationContainerStatusOk | ( | ) |
Sends a status ok on the channel.
Under normal circumstances this method is not used.
void Caplin.DataSource.Notification.INotificationChannel.SendNotificationContainerStatusStale | ( | ) |
Sends a status stale on the channel.
Under normal circumstances this method is not used.
void Caplin.DataSource.Notification.INotificationChannel.SendNotificationNotFound | ( | string | uniqueId | ) |
Sends a not found for a Notification.
Specifically for the case where there is more than one NotificationProvider.
Sent in response to a INotificationChannelListener.OnNotificationRequest when the item requested is not serviceable by your application.
uniqueId | of item that cannot be serviced by your application. |
void Caplin.DataSource.Notification.INotificationChannel.SendNotifications | ( | IList< Caplin.DataSource.Notification.Notification > | items | ) |
Adds Notifications to the internal cache and sends a container add so that these items are requested when the channel is subscribed to.
If any items with the same unique id already exists in the internal cache then these items fields will be updated with these one. This will then trigger an update for any users currently subscribed to these items.
items | to send |
void Caplin.DataSource.Notification.INotificationChannel.SendNotificationStatusOk | ( | string | uniqueId | ) |
Send status ok for a Notification.
Under normal circumstances this method is not used.
uniqueId | of the message whose status is OK |
void Caplin.DataSource.Notification.INotificationChannel.SendNotificationStatusStale | ( | string | uniqueId | ) |
Send status stale for a Notification.
Under normal circumstances this method is not used.
uniqueId | of the message whose status is STALE |
void Caplin.DataSource.Notification.INotificationChannel.SetNotificationChannelListener | ( | Caplin.DataSource.Notification.INotificationChannelListener | listener | ) |
Your application SHOULD set a INotificationChannelListener on the channel. On this listener, your application will receive callbacks on requests for Notifications not in the cache and when a front-end client sends actions in response to the notification.
See NotificationConfiguration for information about having a distributed notification provision, the scenario where a request could come in for an item not in cache.
listener | to receive requests for items not already cached by the NotificationAPI |
|
get |
Returns the subject for the channel.
subject for the channel
|
get |
Returns the username for the channel
username for the channel