|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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 |
fireThrowable(Throwable throwable)
|
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)
INotifierDepending 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 INotifierpublic void removeListener(IListener listener)
INotifier
removeListener in interface INotifierpublic boolean hasListeners()
INotifiertrue if one or more listeners are registered with this notifier, false otherwise.
hasListeners in interface INotifierpublic IListener[] getListeners()
INotifierDepending on the implementation duplicate listeners may be contained in the returned array.
getListeners in interface INotifierpublic void fireEvent()
public void fireEvent(IEvent event)
public void fireEvent(IEvent event,
IListener[] listeners)
protected void fireThrowable(Throwable throwable)
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 | ||||||||