|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.Notifier
public final class Notifier
Notifier objects are created exclusively by the NotificationService
and deliver events as long as they are not stopped by the NotificationService.
The mechanism of a Notifier is somewhat similar to a Observable
object, but the Notifier can monitor any object without the restriction
of the monitored object being a subclass of java.util.Observable.
NotificationService,
NotificationListener,
Observable| Method Summary | |
|---|---|
void |
addListener(NotificationListener listener)
|
boolean |
contains(NotificationListener listener)
|
boolean |
deliverNotification(EventObject event)
runs synchronized on the embedded monitoredObject and delviers the event to all listeners |
boolean |
deliverNotification(Object source)
generates and delivers a simple EventObject with the given object as source (which may be null) |
NotificationListener[] |
getListeners()
|
Object |
getMonitoredObject()
|
boolean |
hasListeners()
|
boolean |
isStopped()
|
void |
removeAll()
|
void |
removeListener(NotificationListener listener)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean isStopped()
public Object getMonitoredObject()
public void addListener(NotificationListener listener)
throws IllegalStateException
IllegalStateException - if this Notifier has been stopped by the NotificationServicepublic void removeListener(NotificationListener listener)
public boolean contains(NotificationListener listener)
public NotificationListener[] getListeners()
public boolean hasListeners()
public void removeAll()
public boolean deliverNotification(Object source)
public boolean deliverNotification(EventObject event)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||