Class EventCapturer

java.lang.Object
com.opencqrs.framework.persistence.EventCapturer
All Implemented Interfaces:
EventPublisher
Direct Known Subclasses:
CommandEventCapturer

public class EventCapturer extends Object implements EventPublisher
In-memory implementation of EventPublisher using CapturedEvents.
See Also:
  • Constructor Details

    • EventCapturer

      public EventCapturer()
  • Method Details

    • getEvents

      public List<CapturedEvent> getEvents()
      Retrieves the list of events captured by this EventPublisher.
      Returns:
      the list of captured events
    • publish

      public <E> void publish(String subject, E event, Map<String,?> metaData, List<Precondition> preconditions)
      Description copied from interface: EventPublisher
      Publishes the given event and its meta-data onto the given subject with preconditions.
      Specified by:
      publish in interface EventPublisher
      Type Parameters:
      E - the generic event type
      Parameters:
      subject - the absolute subject path
      event - the event object
      metaData - the event meta-data
      preconditions - the preconditions that must not be violated