Package org.eclipse.net4j.util.event
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,ManagedContainer,Negotiator,Notifier,NotifyingMonitor,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 INotifierAn entity that a number oflistenerscan be registered with and that can fireeventsto 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
Notifierinstead of implementing this interface directly.- Author:
- Eike Stepper
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceINotifier.INotifier2
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(IListener listener)Adds a listener to this notifier.IListener[]getListeners()Returns the listeners that are registered with this notifier.booleanhasListeners()Returnstrueif one or more listeners are registered with this notifier,falseotherwise.voidremoveListener(IListener listener)Removes a listener from this notifier.
-
-
-
Method Detail
-
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()
Returnstrueif one or more listeners are registered with this notifier,falseotherwise.- 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
-
-