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
    Modifier and Type
    Optional Element
    Description
    Optional identification of the name of the domain event handled by this handler.
    Optional identification of the namespace of the domain event handled by this handler.
  • Element Details

    • namespace

      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 to DomainEvent.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 the name() 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 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 to DomainEvent.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:
      ""