Package io.atomix.utils.event
Class AbstractListenerManager<E extends Event,L extends EventListener<E>>
java.lang.Object
io.atomix.utils.event.AbstractListenerManager<E,L>
- All Implemented Interfaces:
ListenerService<E,L>
public abstract class AbstractListenerManager<E extends Event,L extends EventListener<E>>
extends Object
implements ListenerService<E,L>
Basis for components which need to export listener mechanism.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(L listener) Adds the specified listener.protected voidPosts the specified event to the local event dispatcher.voidremoveListener(L listener) Removes the specified listener.
-
Field Details
-
listenerRegistry
-
-
Constructor Details
-
AbstractListenerManager
public AbstractListenerManager()
-
-
Method Details
-
addListener
Description copied from interface:ListenerServiceAdds the specified listener.- Specified by:
addListenerin interfaceListenerService<E extends Event,L extends EventListener<E>> - Parameters:
listener- listener to be added
-
removeListener
Description copied from interface:ListenerServiceRemoves the specified listener.- Specified by:
removeListenerin interfaceListenerService<E extends Event,L extends EventListener<E>> - Parameters:
listener- listener to be removed
-
post
Posts the specified event to the local event dispatcher.- Parameters:
event- event to be posted; may be null
-