Interface NotificationManager<L,N>
-
- Type Parameters:
L
- the listener typeN
- the notification type
- All Known Implementing Classes:
QueuedNotificationManager
public interface NotificationManager<L,N>
Interface for a class that manages queuing and dispatching notifications for multiple listeners.- Author:
- Thomas Pantelis
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
submitNotification(L listener, N notification)
Submits a notification to be queued and dispatched to the given listener.void
submitNotifications(L listener, Iterable<N> notifications)
Submits notifications to be queued and dispatched to the given listener.
-
-
-
Method Detail
-
submitNotification
void submitNotification(L listener, N notification)
Submits a notification to be queued and dispatched to the given listener.Note: This method may block if the listener queue is currently full.
- Parameters:
listener
- the listener to notifynotification
- the notification to dispatch- Throws:
RejectedExecutionException
- if the notification can't be queued for dispatching
-
submitNotifications
void submitNotifications(L listener, Iterable<N> notifications)
Submits notifications to be queued and dispatched to the given listener.Note: This method may block if the listener queue is currently full.
- Parameters:
listener
- the listener to notifynotifications
- the notifications to dispatch- Throws:
RejectedExecutionException
- if a notification can't be queued for dispatching
-
-