public abstract class AbstractEventSupport<E extends EventListener> extends Object implements Externalizable
| Constructor and Description |
|---|
AbstractEventSupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(E listener)
Adds the specified listener to the list of listeners.
|
void |
clear() |
List<E> |
getEventListeners() |
protected boolean |
hasListeners() |
<O> void |
notifyAllListeners(O event,
BiConsumer<E,O> consumer) |
void |
readExternal(ObjectInput in) |
void |
removeEventListener(Class cls)
Removes all event listeners of the specified class.
|
void |
removeEventListener(E listener) |
void |
writeExternal(ObjectOutput out) |
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic <O> void notifyAllListeners(O event,
BiConsumer<E,O> consumer)
protected boolean hasListeners()
public final void addEventListener(E listener)
listener - to addpublic final void removeEventListener(Class cls)
cls - class of listener to removepublic final void removeEventListener(E listener)
public void clear()
Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.