EventMessage. As such, the method will react to the occurrences within an application.
@EventHandler. This object is most often referred to as an Event Handling Component, or simply an Event Handler. When drafting an
@EventHandlerannotated method, the declared parameters of the method define which events it will receive.
EventMessage. If the event handler does not need access to the payload of the message, you can specify the expected payload type on the
this.getClass()), all annotated methods are evaluated.
SubListenerfor all instances of
EventC(as it extends
EventB). In other words, the handler methods of
TopListenerwill not receive any invocations for
EventCat all. Since
EventAis not assignable to
EventB(it is its superclass), the
TopListener'shandler method will process them.
EventProcessingConfigurer, which can be accessed from the global Axon
EventProcessingConfigureris used to configure an
EventProcessingConfiguration. Typically, an application will have a single
EventProcessingConfigurationdefined, but larger, more modular applications may define one per module.
@EventHandlermethods, consider the following samples:
Configurerexposes several options towards registering an Event Handling Component: