Record Class EventMessage<E extends Event>
java.lang.Object
java.lang.Record
app.dodb.smd.api.event.EventMessage<E>
- All Implemented Interfaces:
Message<E, EventMessage<E>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionandMetadata(Metadata newMetadata) final booleanIndicates whether some other object is "equal to" this one.static <E extends Event>
EventMessage<E> final inthashCode()Returns a hash code value for this object.Returns the value of themessageIdrecord component.metadata()Returns the value of themetadatarecord component.payload()Returns the value of thepayloadrecord component.Returns the value of thesubjectIdrecord component.final StringtoString()Returns a string representation of this record class.withMetadata(Metadata newMetadata)
-
Constructor Details
-
EventMessage
Creates an instance of aEventMessagerecord class.- Parameters:
messageId- the value for themessageIdrecord componentsubjectId- the value for thesubjectIdrecord componentpayload- the value for thepayloadrecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
from
-
withMetadata
- Specified by:
withMetadatain interfaceMessage<E extends Event, EventMessage<E extends Event>>
-
andMetadata
- Specified by:
andMetadatain interfaceMessage<E extends Event, EventMessage<E extends Event>>
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
messageId
-
subjectId
-
payload
-
metadata
-