T
- The type of payload contained in this Messagepublic class GenericTrackedDomainEventMessage<T> extends GenericDomainEventMessage<T> implements TrackedEventMessage<T>
DomainEventMessage
that is also a TrackedEventMessage
.clock
Modifier | Constructor and Description |
---|---|
|
GenericTrackedDomainEventMessage(TrackingToken trackingToken,
DomainEventMessage<T> delegate)
Initialize a DomainEventMessage originating from an aggregate.
|
protected |
GenericTrackedDomainEventMessage(TrackingToken trackingToken,
String type,
String aggregateIdentifier,
long sequenceNumber,
Message<T> delegate,
Instant timestamp)
Initialize a DomainEventMessage originating from an aggregate.
|
|
GenericTrackedDomainEventMessage(TrackingToken trackingToken,
String type,
String aggregateIdentifier,
long sequenceNumber,
Message<T> delegate,
Supplier<Instant> timestamp)
Initialize a DomainEventMessage originating from an Aggregate using existing data.
|
Modifier and Type | Method and Description |
---|---|
GenericTrackedDomainEventMessage<T> |
andMetaData(Map<String,?> metaData)
Returns a copy of this EventMessage with it MetaData merged with the given
metaData . |
TrackingToken |
trackingToken()
Returns the
TrackingToken of the event message. |
GenericTrackedDomainEventMessage<T> |
withMetaData(Map<String,?> metaData)
Returns a copy of this EventMessage with the given
metaData . |
getAggregateIdentifier, getSequenceNumber, getType
asEventMessage, getTimestamp
getDelegate, getIdentifier, getMetaData, getPayload, getPayloadType, serializeMetaData, serializePayload
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIdentifier, getTimestamp
getMetaData, getPayload, getPayloadType
public GenericTrackedDomainEventMessage(TrackingToken trackingToken, DomainEventMessage<T> delegate)
trackingToken
- Tracking token of the eventdelegate
- Delegate domain event containing other event datapublic GenericTrackedDomainEventMessage(TrackingToken trackingToken, String type, String aggregateIdentifier, long sequenceNumber, Message<T> delegate, Supplier<Instant> timestamp)
trackingToken
- Tracking token of the eventtype
- The domain typeaggregateIdentifier
- The identifier of the aggregate generating this messagesequenceNumber
- The message's sequence numberdelegate
- The delegate message providing the payload, metadata and identifier of the eventtimestamp
- The event's timestamp supplierprotected GenericTrackedDomainEventMessage(TrackingToken trackingToken, String type, String aggregateIdentifier, long sequenceNumber, Message<T> delegate, Instant timestamp)
trackingToken
- Tracking token of the eventtype
- The domain typeaggregateIdentifier
- The identifier of the aggregate generating this messagesequenceNumber
- The message's sequence numberdelegate
- The delegate message providing the payload, metadata and identifier of the eventtimestamp
- The event's timestamppublic TrackingToken trackingToken()
TrackedEventMessage
TrackingToken
of the event message.trackingToken
in interface TrackedEventMessage<T>
public GenericTrackedDomainEventMessage<T> withMetaData(Map<String,?> metaData)
EventMessage
metaData
. The payload, Timestamp
and Identifier
remain unchanged.withMetaData
in interface EventMessage<T>
withMetaData
in interface DomainEventMessage<T>
withMetaData
in interface Message<T>
withMetaData
in class GenericDomainEventMessage<T>
metaData
- The new MetaData for the Messagepublic GenericTrackedDomainEventMessage<T> andMetaData(Map<String,?> metaData)
EventMessage
metaData
. The payload,
Timestamp
and Identifier
remain unchanged.andMetaData
in interface EventMessage<T>
andMetaData
in interface DomainEventMessage<T>
andMetaData
in interface Message<T>
andMetaData
in class GenericDomainEventMessage<T>
metaData
- The MetaData to merge withCopyright © 2010–2017. All rights reserved.