Class AnnotatedEventHandler<EVENT_TYPE>

  • Type Parameters:
    EVENT_TYPE - the base type for the events being handled
    All Implemented Interfaces:
    Consumer<EVENT_TYPE>

    public class AnnotatedEventHandler<EVENT_TYPE>
    extends Object
    implements Consumer<EVENT_TYPE>
    Extending this class will allow you to colocate multiple related Event handling methods inside the same class and use it together with the LocalEventBus
    Each method must accept a single Event argument, return void and be annotated with the EventHandler annotation.
    The method argument type is matched against the concrete event type using Class.isAssignableFrom(Class).
    The method accessibility can be any combination of private, protected, public, etc.
    Example:
    {@code
     public class OrderEventsHandler extends AnnotatedEventHandler {
    • Constructor Detail

      • AnnotatedEventHandler

        public AnnotatedEventHandler()