|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.net4j.util.event.Notifier
A default implementation of a notifier
.
Constructor Summary | |
---|---|
Notifier()
|
Method Summary | |
---|---|
void |
addListener(IListener listener)
Adds a listener to this notifier. |
void |
fireEvent()
|
void |
fireEvent(IEvent event)
|
void |
fireEvent(IEvent event,
IListener[] listeners)
|
protected void |
firstListenerAdded()
|
IListener[] |
getListeners()
Returns the listeners that are registered with this notifier. |
protected ExecutorService |
getNotificationService()
|
boolean |
hasListeners()
Returns true if one or more listeners are registered with this notifier, false otherwise. |
protected void |
lastListenerRemoved()
|
void |
removeListener(IListener listener)
Removes a listener from this notifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Notifier()
Method Detail |
---|
public void addListener(IListener listener)
INotifier
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,
addListener
in interface INotifier
public void removeListener(IListener listener)
INotifier
removeListener
in interface INotifier
public boolean hasListeners()
INotifier
true
if one or more listeners are registered with this notifier, false
otherwise.
hasListeners
in interface INotifier
public IListener[] getListeners()
INotifier
Depending on the implementation duplicate listeners may be contained in the returned array.
getListeners
in interface INotifier
public void fireEvent()
public void fireEvent(IEvent event)
public void fireEvent(IEvent event, IListener[] listeners)
protected ExecutorService getNotificationService()
protected void firstListenerAdded()
protected void lastListenerRemoved()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |