Package io.microsphere.event
Class GenericEventListener
- java.lang.Object
-
- io.microsphere.event.GenericEventListener
-
- All Implemented Interfaces:
EventListener<Event>,Prioritized,java.lang.Comparable<Prioritized>,java.util.EventListener
public abstract class GenericEventListener extends java.lang.Object implements EventListener<Event>
An abstract class ofEventListenerfor Generic events, the sub class could add moreeventhandle methods, rather than only binds theEventListener.onEvent(Event)method that is declared to befinalthe implementation can't override. It's notable that alleventhandle methods must meet following conditions:- not
onEvent(Event)method publicaccessibilityvoidreturn type- no
exceptiondeclaration - only one
Eventtype argument
- Since:
- 1.0.0
- See Also:
Event,EventListener
-
-
Field Summary
-
Fields inherited from interface io.microsphere.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGenericEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonEvent(Event event)Handle aEventwhen it's be published-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.microsphere.event.EventListener
getPriority
-
Methods inherited from interface io.microsphere.lang.Prioritized
compareTo
-
-
-
-
Method Detail
-
onEvent
public final void onEvent(Event event)
Description copied from interface:EventListenerHandle aEventwhen it's be published- Specified by:
onEventin interfaceEventListener<Event>- Parameters:
event- aEvent
-
-