Class AbstractSequencedDomainEventEntry<T>

All Implemented Interfaces:
DomainEventData<T>, EventData<T>
Direct Known Subclasses:
DomainEventEntry

@MappedSuperclass @MappedSuperclass public abstract class AbstractSequencedDomainEventEntry<T> extends AbstractDomainEventEntry<T> implements DomainEventData<T>
Abstract base class of a serialized domain event. Fields in this class contain JPA annotations that direct JPA event storage engines how to store event entries.
Author:
Rene de Waele
  • Constructor Details

    • AbstractSequencedDomainEventEntry

      public AbstractSequencedDomainEventEntry(DomainEventMessage<?> eventMessage, Serializer serializer, Class<T> contentType)
      Construct a new default domain event entry from a published domain event message to enable storing the event or sending it to a remote location. The event payload and metadata will be serialized to a byte array.

      The given serializer will be used to serialize the payload and metadata in the given eventMessage. The type of the serialized data will be the same as the given contentType.

      Parameters:
      eventMessage - The event message to convert to a serialized event entry
      serializer - The serializer to convert the event
      contentType - The data type of the payload and metadata after serialization
    • AbstractSequencedDomainEventEntry

      protected AbstractSequencedDomainEventEntry()
      Default constructor required by JPA