onDispatch<TEvent extends DomainEvent> abstract method

void onDispatch<TEvent extends DomainEvent>(
  1. TEvent event,
  2. Set<EventHandler<TEvent>> handlers
)

When the event is dispatched.

handlers will be executed based on the DispatchStrategy.

Implementation

void onDispatch<TEvent extends DomainEvent>(
  TEvent event,
  Set<EventHandler<TEvent>> handlers,
);