Class AnnotatedEventHandler<EVENT_TYPE>
- java.lang.Object
-
- dk.cloudcreate.essentials.reactive.AnnotatedEventHandler<EVENT_TYPE>
-
- Type Parameters:
EVENT_TYPE- the base type for the events being handled
- All Implemented Interfaces:
EventHandler<EVENT_TYPE>
public class AnnotatedEventHandler<EVENT_TYPE> extends Object implements EventHandler<EVENT_TYPE>
Extending this class will allow you to colocate multiple related Event handling methods inside the same class and use it together with theLocalEventBus
Each method must accept a single Event argument, return void and be annotated with theEventHandlerannotation.
The method argument type is matched against the concrete event type usingClass.isAssignableFrom(Class).
The method accessibility can be any combination of private, protected, public, etc.
Example:
{@code public class OrderEventsHandler extends AnnotatedEventHandler{
-
-
Constructor Summary
Constructors Constructor Description AnnotatedEventHandler()
-
-
-
Method Detail
-
handle
public final void handle(EVENT_TYPE event)
- Specified by:
handlein interfaceEventHandler<EVENT_TYPE>
-
-