Package org.jmolecules.event.annotation
Annotation Type DomainEventHandler
-
@Documented @Retention(RUNTIME) @Target({METHOD,ANNOTATION_TYPE}) public @interface DomainEventHandler
Identifies a domain event handler, i.e. logic to process aDomainEvent
.- Since:
- 1.1
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
name
Optional identification of the name of the domain event handled by this handler.java.lang.String
namespace
Optional identification of the namespace of the domain event handled by this handler.
-
-
-
Element Detail
-
namespace
java.lang.String namespace
Optional identification of the namespace of the domain event handled by this handler. This information may be used for easier linkage between event and handler by external tools and refers toDomainEvent.namespace()
. When leaving the default value, it is assumed that the method signature makes clear what event is consumed. If the handler takes care of all events of a specific namespace, the value of this field needs to be set to the respective namespace and thename()
needs to be set accordingly. If the handler doesn't care about the namespace, the value may be set to the '*' (asterisk) placeholder.- Default:
- ""
-
-
-
name
java.lang.String name
Optional identification of the name of the domain event handled by this handler. This information may be used for easier linkage between event and handler by external tools and refers toDomainEvent.name()
. When leaving the default value, it is assumed that the method signature makes clear what event is consumed. If the handler takes care of all events of a specific namespace, the value of this field needs to be set to the '*' asterisk placeholder.- Default:
- ""
-
-