Interface INotifier

All Known Subinterfaces:
ICacheMonitor, IContainer<E>, IContainer.Modifiable<E>, IContainer.Persistable<E>, IContainerBlockingQueue<E>, IContainerCollection<E>, IContainerList<E>, IContainerMap<K,V>, IContainerQueue<E>, IContainerSet<E>, IContainerSortedSet<E>, IHistory<T>, ILifecycle, IManagedContainer, INotifier.INotifier2, IOptions, IPluginContainer, IRegistry<K,V>, OMPreferences
All Known Implementing Classes:
AbstractDelegator, Cache, CacheMonitor, ChallengeNegotiator, ChallengeResponseNegotiator, Container, ContainerBlockingQueue, ContainerCollection, ContainerList, ContainerMap, ContainerQueue, ContainerSet, ContainerSortedSet, DelegableReentrantLock, DelegatingRegistry, ElementWizard, ExecutorServiceNotifier, ExecutorServiceNotifier.ThreadPool, ExecutorWorkSerializer, FileUserManager, FiniteStateMachine, HashMapDelegatingRegistry, HashMapRegistry, HashMapRegistry.AutoCommit, History, Lifecycle, LifecycleHook, ListContainer, ManagedContainer, ModifiableContainer, Negotiator, Notifier, NotifyingMonitor, PersistableContainer, PreferenceHistory, PriorityQueueRunner, QueueRunner, QueueRunner2, QueueWorker, QueueWorkerWorkSerializer, Randomizer, ReferenceMonitor, ReferenceQueueWorker, Registry, ResponseNegotiator, RollingLog, RWLockManager, RWOLockManager, SashComposite, SerializingExecutor, SetContainer, ShareableLifecycle, TimerLifecycle, UIQueueRunner, UnmodifiableRegistry, UserManager, UserManagerAuthenticator, ValueNotifier, Worker

public interface INotifier
An entity that a number of listeners can be registered with and that can fire events to these registered listeners.

Implementors are encouraged to document the event types that they are able to fire and that their listeners may want to receive and handle.

Implementors may want to extend Notifier instead of implementing this interface directly.

Author:
Eike Stepper
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a listener to this notifier.
    Returns the listeners that are registered with this notifier.
    boolean
    Returns true if one or more listeners are registered with this notifier, false otherwise.
    void
    Removes a listener from this notifier.
  • Method Details

    • addListener

      void addListener(IListener listener)
      Adds a listener to this notifier.

      Depending on the implementation duplicate listeners may lead to duplicate event delivery or not. Implementors are encouraged to prevent events from being delivered more than once to the same listener,

    • removeListener

      void removeListener(IListener listener)
      Removes a listener from this notifier.
    • hasListeners

      boolean hasListeners()
      Returns true if one or more listeners are registered with this notifier, false otherwise.
      Since:
      3.0
    • getListeners

      IListener[] getListeners()
      Returns the listeners that are registered with this notifier.

      Depending on the implementation duplicate listeners may be contained in the returned array.

      Since:
      3.0