Class EventCapturer
java.lang.Object
com.opencqrs.framework.persistence.EventCapturer
- All Implemented Interfaces:
EventPublisher
- Direct Known Subclasses:
CommandEventCapturer
In-memory implementation of
EventPublisher
using CapturedEvent
s.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the list of events captured by thisEventPublisher
.<E> void
Publishes the given event and its meta-data onto the given subject with preconditions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.opencqrs.framework.persistence.EventPublisher
publish, publish
-
Constructor Details
-
EventCapturer
public EventCapturer()
-
-
Method Details
-
getEvents
Retrieves the list of events captured by thisEventPublisher
.- 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 interfaceEventPublisher
- Type Parameters:
E
- the generic event type- Parameters:
subject
- the absolute subject pathevent
- the event objectmetaData
- the event meta-datapreconditions
- the preconditions that must not be violated
-