S - The type of the sourceL - The type of the event listenerspublic abstract class AbstractListenerManager<S,L extends EventListener> extends Object
EventListener implementations, and
subclasses are responsible for firing appropriate events.| Constructor and Description |
|---|
AbstractListenerManager(S source)
Creates a new listener support that emits events from the given source.
|
AbstractListenerManager(S source,
Executor executor)
Creates a new listener support that emits events from the given source.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(L listener)
Adds the given listener to the list of reigstered listeners.
|
protected Executor |
getExecutor()
Returns the executor for the event firing.
|
protected List<L> |
getListeners()
Returns a list of all registered listeners.
|
protected S |
getSource()
Returns the source for the events.
|
void |
removeListener(L listener)
Removes the given listener from the list of registered listeners.
|
public AbstractListenerManager(S source)
source - The source of the eventspublic void addListener(L listener)
listener - The listener to addpublic void removeListener(L listener)
listener - The listener to removeprotected S getSource()
protected Executor getExecutor()
Copyright © 2026. All rights reserved.