Package org.jmolecules.event.annotation
Annotation Interface DomainEventHandler
@Documented
@Retention(RUNTIME)
@Target({METHOD,ANNOTATION_TYPE})
public @interface DomainEventHandler
Identifies a domain event handler, i.e. logic to process a
DomainEvent
.- Since:
- 1.1
-
Optional Element Summary
Optional Elements
-
Element Details
-
namespace
String namespaceOptional 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
String nameOptional 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:
""
-