Class NotificationProvider

java.lang.Object
com.caplin.datasource.notification.NotificationProvider

public class NotificationProvider extends Object

If you want to manage notifications within your application you MUST create an instance of this class. This class manages notification subscription requests and provides your NotificationApplicationListener with callbacks when users log in and log out of the system.

User logins are delegated to your application as NotificationApplicationListener.notificationChannelOpened(NotificationChannel) calls. For details of how to send Notifications, see NotificationChannel.

  • Constructor Details

    • NotificationProvider

      public NotificationProvider(com.caplin.datasource.DataSource dataSource, NotificationConfiguration configuration, NotificationApplicationListener listener)
      Create a NotificationProvider registering your application.
      Parameters:
      dataSource - An unstarted DataSource
      configuration - NotificationConfiguration for your application
      listener - Callback to your application on notification channel and notification item requests are received on this
  • Method Details

    • getVersion

      public String getVersion()

      Get the Notification API version.

      Returns:
      version Version of the Notification API in use
    • publishNotification

      public void publishNotification(String user, Notification notification)
    • deleteNotification

      public void deleteNotification(String user, String notificationId)