Package org.eclipse.net4j.util.event
Class Notifier
- java.lang.Object
- 
- org.eclipse.net4j.util.event.Notifier
 
- 
- All Implemented Interfaces:
- INotifier,- INotifier.INotifier2
 - Direct Known Subclasses:
- AbstractDelegator,- ElementWizard,- ExecutorServiceNotifier,- History,- Lifecycle,- ValueNotifier
 
 public class Notifier extends java.lang.Object implements INotifier.INotifier2 A default implementation of anotifier.- Since:
- 3.0
- Author:
- Eike Stepper
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifierINotifier.INotifier2
 
- 
 - 
Constructor SummaryConstructors Constructor Description Notifier()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(IListener listener)Adds a listener to this notifier.booleanaddUniqueListener(IListener listener)Adds a listener to this notifier unless this notifier alreadycontainsthe listener.voidfireEvent()voidfireEvent(IEvent event)voidfireEvent(IEvent event, IListener[] listeners)protected voidfireThrowable(java.lang.Throwable throwable)protected voidfirstListenerAdded()IListener[]getListeners()Returns the listeners that are registered with this notifier.protected java.util.concurrent.ExecutorServicegetNotificationService()booleanhasListener(IListener listener)Returnstrueif this notifier contains the listener,falseotherwise.booleanhasListeners()Returnstrueif one or more listeners are registered with this notifier,falseotherwise.protected voidlastListenerRemoved()protected voidlistenerAdded(IListener listener)protected voidlistenerRemoved(IListener listener)voidremoveListener(IListener listener)Removes a listener from this notifier.
 
- 
- 
- 
Method Detail- 
addUniqueListenerpublic boolean addUniqueListener(IListener listener) Description copied from interface:INotifier.INotifier2Adds a listener to this notifier unless this notifier alreadycontainsthe listener.- Specified by:
- addUniqueListenerin interface- INotifier.INotifier2
 
 - 
addListenerpublic void addListener(IListener listener) Description copied from interface:INotifierAdds 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, - Specified by:
- addListenerin interface- INotifier
 
 - 
removeListenerpublic void removeListener(IListener listener) Description copied from interface:INotifierRemoves a listener from this notifier.- Specified by:
- removeListenerin interface- INotifier
 
 - 
hasListenerpublic boolean hasListener(IListener listener) Description copied from interface:INotifier.INotifier2Returnstrueif this notifier contains the listener,falseotherwise.- Specified by:
- hasListenerin interface- INotifier.INotifier2
 
 - 
hasListenerspublic boolean hasListeners() Description copied from interface:INotifierReturnstrueif one or more listeners are registered with this notifier,falseotherwise.- Specified by:
- hasListenersin interface- INotifier
 
 - 
getListenerspublic IListener[] getListeners() Description copied from interface:INotifierReturns the listeners that are registered with this notifier.Depending on the implementation duplicate listeners may be contained in the returned array. - Specified by:
- getListenersin interface- INotifier
 
 - 
fireEventpublic void fireEvent() - Since:
- 3.2
 
 - 
fireEventpublic void fireEvent(IEvent event) 
 - 
fireThrowableprotected void fireThrowable(java.lang.Throwable throwable) - Since:
- 3.3
 
 - 
getNotificationServiceprotected java.util.concurrent.ExecutorService getNotificationService() - Since:
- 3.0
 
 - 
listenerAddedprotected void listenerAdded(IListener listener) - Since:
- 3.13
 
 - 
listenerRemovedprotected void listenerRemoved(IListener listener) - Since:
- 3.13
 
 - 
firstListenerAddedprotected void firstListenerAdded() - Since:
- 3.0
 
 - 
lastListenerRemovedprotected void lastListenerRemoved() - Since:
- 3.0
 
 
- 
 
-