Package dk.cloudcreate.essentials.reactive
package dk.cloudcreate.essentials.reactive
-
ClassDescriptionExtending 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 theHandlerannotation.
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:Simple event bus concept that supports both synchronous and asynchronous subscribers that are registered and listening for events published
Usage example:Common interface for all Event message handlersGeneric Method annotation that can be applied to any single argument method inside aAnnotatedCommandHandlerorAnnotatedEventHandler.
Depending on which class you extend the rules that apply to each method may be different.
Common for all is that the method accessibility can be any combination of private, protected, public, etc.Simple event bus that supports both synchronous and asynchronous subscribers that are registered and listening for events published within the local the JVM
You can have multiple instances of the LocalEventBus deployed with the local JVM, but usually one event bus is sufficient.
Example:Error Handler interface for theLocalEventBus's asynchronous event handler failures