Interface NotificationService

All Known Implementing Classes:
NotificationServiceImpl

public interface NotificationService
Represents a source of notifications.
  • Method Details

    • subscribe

      Subscribes (asynchronously) to a given topic, providing a listener that will be invoked at notification reception time.
      Parameters:
      topic - topic name to subscribe to
      listener - notification listener
      Returns:
      a promise of a subscription that will be completed after AM sends back the acknowledgement.
    • addConnectionEventListener

      Registers asynchronously a listener that will be notified on connection/disconnection events. The returned Promise will be completed once the NotificationService is connected.
      Parameters:
      listener - consumer of connection events
      Returns:
      a promise of a registration object that has to be used for un-registration