Annotation Type EventHandler
-
@Target(METHOD) @Retention(RUNTIME) public @interface EventHandlerMarks a method as an event handler.This method will be invoked whenever an event matching this event handlers event class is either replayed on entity recovery, by a command handler.
The method may take the event object as a parameter.
Methods annotated with this may take an
EventContext.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class<?>eventClassThe event class.
-
-
-
Element Detail
-
eventClass
java.lang.Class<?> eventClass
The event class. Generally, this will be determined by looking at the parameter of the event handler method, however if the event doesn't need to be passed to the method (for example, perhaps it contains no data), then this can be used to indicate which event this handler handles.- Default:
- java.lang.Object.class
-
-