Record Class CommandMessage<R, C extends Command<R>>
java.lang.Object
java.lang.Record
app.dodb.smd.api.command.CommandMessage<R,C>
- All Implemented Interfaces:
Message<C, CommandMessage<R,C>>
-
Constructor Summary
ConstructorsConstructorDescriptionCommandMessage(MessageId messageId, C payload, Metadata metadata) Creates an instance of aCommandMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionandMetadata(Metadata newMetadata) final booleanIndicates whether some other object is "equal to" this one.static <R, C extends Command<R>>
CommandMessage<R, C> 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.final StringtoString()Returns a string representation of this record class.withMetadata(Metadata newMetadata)
-
Constructor Details
-
CommandMessage
Creates an instance of aCommandMessagerecord class.- Parameters:
messageId- the value for themessageIdrecord componentpayload- the value for thepayloadrecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
from
-
withMetadata
-
andMetadata
-
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
-
payload
-
metadata
-