public interface EventSource
| Modifier and Type | Method and Description |
|---|---|
default void |
addListener(EventListener listener)
Adds an
EventListener which will be notified whenever the Observable becomes invalid. |
AtomicBoolean |
autoNotification()
Set the automatic notification of invalidation listeners.
|
default void |
invokeListener()
invoke object within update listener list
|
default void |
invokeListener(UpdateEvent updateEvent)
invoke object within update listener list
|
default void |
invokeListener(UpdateEvent updateEvent,
boolean executeParallel)
invoke object within update listener list
|
default boolean |
isAutoNotification()
Checks it automatic notification is enabled.
|
default void |
removeListener(EventListener listener)
Removes the given listener from the list of listeners, that are notified whenever the value of the
UpdateSource becomes invalid. |
List<EventListener> |
updateEventListener() |
default void addListener(EventListener listener)
EventListener which will be notified whenever the Observable becomes invalid. If the same
listener is added more than once, then it will be notified more than once. That is, no check is made to ensure
uniqueness.
Note that the same actual InvalidationListener instance may be safely registered for different
UpdateSource.
The UpdateSource stores a strong reference to the listener which will prevent the listener from being
garbage collected and may result in a memory leak.
listener - The listener to registerNullPointerException - if the listener is nullremoveListener(EventListener)AtomicBoolean autoNotification()
true for automatic
notificationdefault void invokeListener()
default void invokeListener(UpdateEvent updateEvent)
updateEvent - the event the listeners are notified withdefault void invokeListener(UpdateEvent updateEvent, boolean executeParallel)
updateEvent - the event the listeners are notified withexecuteParallel - true execute event listener via parallel executor servicedefault boolean isAutoNotification()
true if automatic notification is enableddefault void removeListener(EventListener listener)
UpdateSource becomes invalid.
If the given listener has not been previously registered (i.e. it was never added) then this method call is a no-op. If it had been previously added then it will be removed. If it had been added more than once, then only the first occurrence will be removed.
listener - The listener to removeNullPointerException - if the listener is nulladdListener(EventListener)List<EventListener> updateEventListener()
Copyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.