|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An entity that a number of listeners
can be registered with and that can fire events
to these registered listeners.
Implementors are encouraged to document the event types that they are able to fire and that their listeners may want to receive and handle.
Implementors may want to extend Notifier
instead of implementing this interface directly.
Method Summary | |
---|---|
void |
addListener(IListener listener)
Adds a listener to this notifier. |
IListener[] |
getListeners()
Returns the listeners that are registered with this notifier. |
boolean |
hasListeners()
Returns true if one or more listeners are registered with this notifier, false otherwise. |
void |
removeListener(IListener listener)
Removes a listener from this notifier. |
Method Detail |
---|
void addListener(IListener listener)
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,
void removeListener(IListener listener)
boolean hasListeners()
true
if one or more listeners are registered with this notifier, false
otherwise.
IListener[] getListeners()
Depending on the implementation duplicate listeners may be contained in the returned array.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |