Package com.pnfsoftware.jeb.core.units
Class UnitNotificationManager
java.lang.Object
com.pnfsoftware.jeb.core.units.UnitNotificationManager
- All Implemented Interfaces:
IUnitNotificationManager
Standard implementation of a notification manager.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotification(IUnitNotification notification) Add a notification.voidaddNotifications(Collection<? extends IUnitNotification> c) Add notifications.getNotification(String key) Retrieve a notification by key.intRetrieve the number of notifications.Retrieve the notifications.booleanremoveNotification(String key) Remove a notification by key.
-
Constructor Details
-
UnitNotificationManager
public UnitNotificationManager()Create an empty notification manager.
-
-
Method Details
-
getNotifications
Description copied from interface:IUnitNotificationManagerRetrieve the notifications.- Specified by:
getNotificationsin interfaceIUnitNotificationManager- Returns:
- notifications, possibly empty
-
getNotificationCount
public int getNotificationCount()Description copied from interface:IUnitNotificationManagerRetrieve the number of notifications.- Specified by:
getNotificationCountin interfaceIUnitNotificationManager- Returns:
- notification count
-
addNotification
Description copied from interface:IUnitNotificationManagerAdd a notification.- Specified by:
addNotificationin interfaceIUnitNotificationManager- Parameters:
notification- notification to add
-
addNotifications
Description copied from interface:IUnitNotificationManagerAdd notifications.- Specified by:
addNotificationsin interfaceIUnitNotificationManager- Parameters:
c- notifications to add
-
removeNotification
Description copied from interface:IUnitNotificationManagerRemove a notification by key.- Specified by:
removeNotificationin interfaceIUnitNotificationManager- Parameters:
key- notification key- Returns:
- true if a notification was removed
-
getNotification
Description copied from interface:IUnitNotificationManagerRetrieve a notification by key.- Specified by:
getNotificationin interfaceIUnitNotificationManager- Parameters:
key- notification key- Returns:
- the notification, or null if none
-