Annotation Type DomainEvent


  • @Retention(RUNTIME)
    @Target(TYPE)
    @Documented
    public @interface DomainEvent
    A domain event is a full-fledged part of the domain model, a representation of something that happened in the domain. It allows making the events that the domain experts want to track or be notified of explicit, or which are associated with state change in the other model objects.
    See Also:
    Domain-Driven Design Reference (Evans) - Domain Events
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String name
      An identifier for the name of the event used to abstract away from the type system and to guard against refactorings.
      java.lang.String namespace
      An identifier for the namespace of the event to group multiple events and let clients express their interest in all events of a specific namespace.
    • Element Detail

      • namespace

        java.lang.String namespace
        An identifier for the namespace of the event to group multiple events and let clients express their interest in all events of a specific namespace. If not set, external tooling may default this to the fully-qualified package name of the annotated type.
        Since:
        1.1
        Default:
        ""
      • name

        java.lang.String name
        An identifier for the name of the event used to abstract away from the type system and to guard against refactorings. If not set, external tooling may default this to the simple class name of the annotated type.
        Since:
        1.1
        Default:
        ""