Class SpringDomainEventPublisher

java.lang.Object
com.dmasone.identity.ecommerceapp.events.SpringDomainEventPublisher
All Implemented Interfaces:
EventPublisher

@Component public class SpringDomainEventPublisher extends Object implements EventPublisher
Adapter from the shared event publishing port to Spring's in-process event bus. This keeps domain modules free from a hard dependency on Spring events.
  • Constructor Details

    • SpringDomainEventPublisher

      public SpringDomainEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
  • Method Details

    • publish

      public void publish(DomainEvent event)
      Description copied from interface: EventPublisher
      Publish a domain event inside the current application process.
      Specified by:
      publish in interface EventPublisher
      Parameters:
      event - immutable event fact