Interface NotificationManager<L,N>

Type Parameters:
L - the listener type
N - 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 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 Details

    • 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 notify
      notification - 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 notify
      notifications - the notifications to dispatch
      Throws:
      RejectedExecutionException - if a notification can't be queued for dispatching