public class Notifier extends java.lang.Object implements INotifier
notifier.| Constructor and Description |
|---|
Notifier() |
| Modifier and Type | Method and Description |
|---|---|
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(java.lang.Throwable throwable) |
protected void |
firstListenerAdded() |
IListener[] |
getListeners()
Returns the listeners that are registered with this notifier.
|
protected java.util.concurrent.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.
|
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)
INotifierremoveListener 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)
protected void fireThrowable(java.lang.Throwable throwable)
protected java.util.concurrent.ExecutorService getNotificationService()
protected void firstListenerAdded()
protected void lastListenerRemoved()
Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html