Class AbstractNotifier<T extends Notification>

  • Type Parameters:
    T - notification subtype
    All Implemented Interfaces:
    Observable<T>
    Direct Known Subclasses:
    AbstractPollingNotifier

    public abstract class AbstractNotifier<T extends Notification>
    extends java.lang.Object
    implements Observable<T>
    AbstractNotifier which is used by all types of Notifiers.
    • Field Detail

      • executor

        protected final java.util.concurrent.ScheduledExecutorService executor
    • Constructor Detail

      • AbstractNotifier

        protected AbstractNotifier​(NotificationSystem notifySystem,
                                   java.util.concurrent.ScheduledExecutorService executor)
    • Method Detail

      • registerListener

        public void registerListener​(Listener<T> listener)
        Description copied from interface: Observable
        Register listener for notification type T. Multiple listeners can be added for the same type.
        Specified by:
        registerListener in interface Observable<T extends Notification>
        Parameters:
        listener - This is the listener which will be invoked incase of an Notification.