Annotation Type EventHandler

  • @Target(METHOD)
    public @interface EventHandler
    Marks 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<?> eventClass
      The 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.