Interface NotificationManager<L,N>
- Type Parameters:
L- the listener typeN- the notification type
- All Known Implementing Classes:
EqualityQueuedNotificationManager,IdentityQueuedNotificationManager,QueuedNotificationManager
public interface NotificationManager<L,N>
Interface for a class that manages queuing and dispatching notifications for multiple listeners.
- Author:
- Thomas Pantelis
-
Method Summary
Modifier and TypeMethodDescriptionvoidsubmitNotification(L listener, N notification) Submits a notification to be queued and dispatched to the given listener.voidsubmitNotifications(L listener, Iterable<N> notifications) Submits notifications to be queued and dispatched to the given listener.
-
Method Details
-
submitNotification
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
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
-