Class TrackedDomainEventData<T>

java.lang.Object
org.axonframework.eventhandling.TrackedDomainEventData<T>
Type Parameters:
T - The content type of the serialized data
All Implemented Interfaces:
DomainEventData<T>, EventData<T>, TrackedEventData<T>

public class TrackedDomainEventData<T> extends Object implements TrackedEventData<T>, DomainEventData<T>
Specialization of the DomainEventData class that includes the Token representing the position of this event in a stream.
  • Constructor Details

    • TrackedDomainEventData

      public TrackedDomainEventData(TrackingToken trackingToken, DomainEventData<T> domainEventEntry)
      Initialize the TrackingDomainEventData with given trackingToken and domainEventEntry.
      Parameters:
      trackingToken - The token representing this event's position in a stream
      domainEventEntry - The entry containing the event data itself
  • Method Details

    • trackingToken

      public TrackingToken trackingToken()
      Description copied from interface: TrackedEventData
      Returns the TrackingToken of the serialized event.
      Specified by:
      trackingToken in interface TrackedEventData<T>
      Returns:
      the tracking token of the serialized event
    • getEventIdentifier

      public String getEventIdentifier()
      Description copied from interface: EventData
      Returns the identifier of the serialized event.
      Specified by:
      getEventIdentifier in interface EventData<T>
      Returns:
      the identifier of the serialized event
    • getTimestamp

      public Instant getTimestamp()
      Description copied from interface: EventData
      Returns the timestamp at which the event was first created.
      Specified by:
      getTimestamp in interface EventData<T>
      Returns:
      the timestamp at which the event was first created
    • getMetaData

      public SerializedObject<T> getMetaData()
      Description copied from interface: EventData
      Returns the serialized data of the MetaData of the serialized Event.
      Specified by:
      getMetaData in interface EventData<T>
      Returns:
      the serialized data of the MetaData of the serialized Event
    • getPayload

      public SerializedObject<T> getPayload()
      Description copied from interface: EventData
      Returns the serialized data of the Event Message's payload.
      Specified by:
      getPayload in interface EventData<T>
      Returns:
      the serialized data of the Event Message's payload
    • getType

      public String getType()
      Description copied from interface: DomainEventData
      Returns the type identifier of the aggregate.
      Specified by:
      getType in interface DomainEventData<T>
      Returns:
      the type identifier of the aggregate.
    • getAggregateIdentifier

      public String getAggregateIdentifier()
      Description copied from interface: DomainEventData
      Returns the Identifier of the Aggregate to which the Event was applied.
      Specified by:
      getAggregateIdentifier in interface DomainEventData<T>
      Returns:
      the Identifier of the Aggregate to which the Event was applied
    • getSequenceNumber

      public long getSequenceNumber()
      Description copied from interface: DomainEventData
      Returns the sequence number of the event in the aggregate.
      Specified by:
      getSequenceNumber in interface DomainEventData<T>
      Returns:
      the sequence number of the event in the aggregate