Class NotificationManager
- java.lang.Object
-
- es.bsc.dataclay.logic.notificationmgr.NotificationManager
-
public final class NotificationManager extends Object
Class responsible to handle events and notifications.
-
-
Constructor Summary
Constructors Constructor Description NotificationManager(LogicModule thelogicModule, SQLiteDataSource dataSource)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
adviseEvent(EventMessage newEvent)
New event arrived.void
closeManager()
Shutdown execution service.Queue<EventMessage>
getEvents()
Get the NotificationManager::eventsNotificationManagerDB
getNotificationDB()
Get the NotificationManager::notificationDBvoid
registerEventListenerImpl(ECA newEventListenerImpl)
Register a new event listener.void
removeSessionInCache(AccountID accountID)
Remove all entries that belong to session idvoid
setNotificationDB(NotificationManagerDB newnotificationDB)
Set the NotificationManager::notificationDB
-
-
-
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.
-
-