Class NotificationManager


  • public final class NotificationManager
    extends Object
    Class responsible to handle events and notifications.
    • Constructor Detail

      • NotificationManager

        public NotificationManager​(LogicModule thelogicModule,
                                   SQLiteDataSource dataSource)
        Constructor
        Parameters:
        thelogicModule - Reference to logic module for executing actions
    • Method Detail

      • registerEventListenerImpl

        public void registerEventListenerImpl​(ECA newEventListenerImpl)
        Register a new event listener.
        Parameters:
        newEventListenerImpl - Event listener.
      • adviseEvent

        public void adviseEvent​(EventMessage newEvent)
        New event arrived. Add to queue.
        Parameters:
        newEvent - New event to add to queue.
      • getNotificationDB

        public NotificationManagerDB getNotificationDB()
        Get the NotificationManager::notificationDB
        Returns:
        the notificationDB
      • setNotificationDB

        public void setNotificationDB​(NotificationManagerDB newnotificationDB)
        Set the NotificationManager::notificationDB
        Parameters:
        newnotificationDB - the notificationDB to set
      • getEvents

        public Queue<EventMessage> getEvents()
        Get the NotificationManager::events
        Returns:
        the events
      • removeSessionInCache

        public void removeSessionInCache​(AccountID accountID)
        Remove all entries that belong to session id
        Parameters:
        accountID - Id of the account
      • closeManager

        public void closeManager()
        Shutdown execution service.