T
- The type of payload contained in this Messagepublic class GenericTrackedEventMessage<T> extends GenericEventMessage<T> implements TrackedEventMessage<T>
TrackedEventMessage
.clock
Modifier | Constructor and Description |
---|---|
|
GenericTrackedEventMessage(TrackingToken trackingToken,
EventMessage<T> delegate)
Creates a GenericTrackedEventMessage with given
trackingToken and delegate event message. |
protected |
GenericTrackedEventMessage(TrackingToken trackingToken,
Message<T> delegate,
Instant timestamp)
Initializes a
GenericTrackedEventMessage with given message as delegate and given timestamp . |
|
GenericTrackedEventMessage(TrackingToken trackingToken,
Message<T> delegate,
Supplier<Instant> timestamp)
Creates a GenericTrackedEventMessage with given
trackingToken and delegate event message. |
Modifier and Type | Method and Description |
---|---|
protected void |
describeTo(StringBuilder stringBuilder)
Describe the message specific properties to the given
stringBuilder . |
protected String |
describeType()
Describe the type of message, used in
MessageDecorator.toString() . |
TrackingToken |
trackingToken()
Returns the
TrackingToken of the event message. |
andMetaData, asEventMessage, getTimestamp, withMetaData
getDelegate, getIdentifier, getMetaData, getPayload, getPayloadType, serializeMetaData, serializePayload, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
andMetaData, getIdentifier, getTimestamp, withMetaData
getMetaData, getPayload, getPayloadType
public GenericTrackedEventMessage(TrackingToken trackingToken, EventMessage<T> delegate)
trackingToken
and delegate event message.trackingToken
- tracking token of the eventdelegate
- delegate message containing payload, metadata, identifier and timestamppublic GenericTrackedEventMessage(TrackingToken trackingToken, Message<T> delegate, Supplier<Instant> timestamp)
trackingToken
and delegate event message. The timestamp
of the event is supplied lazily to prevent unnecessary deserialization of the timestamp.trackingToken
- tracking token of the eventdelegate
- delegate message containing payload, metadata, identifier and timestamptimestamp
- supplier of the message's timestampprotected GenericTrackedEventMessage(TrackingToken trackingToken, Message<T> delegate, Instant timestamp)
GenericTrackedEventMessage
with given message as delegate and given timestamp
. The
given message will be used supply the payload, metadata and identifier of the resulting event message.trackingToken
- the tracking token of the resulting messagedelegate
- the message that will be used used as delegatetimestamp
- the timestamp of the resulting event messagepublic TrackingToken trackingToken()
TrackedEventMessage
TrackingToken
of the event message.trackingToken
in interface TrackedEventMessage<T>
protected void describeTo(StringBuilder stringBuilder)
MessageDecorator
stringBuilder
. Subclasses should override this
method, calling the super method and appending their own properties to the end (or beginning).
As convention, String values should be enclosed in single quotes, Objects in curly brackets and numeric values may be appended without enclosing. All properties should be preceded by a comma when appending, or finish with a comma when prefixing values.
describeTo
in class GenericEventMessage<T>
stringBuilder
- the builder to append data toprotected String describeType()
MessageDecorator
MessageDecorator.toString()
.
Defaults to the simple class name of the actual instance.
describeType
in class GenericEventMessage<T>
Copyright © 2010–2018. All rights reserved.