Record Class CommandMessage<R,C extends Command<R>>
java.lang.Object
java.lang.Record
app.dodb.smd.api.command.CommandMessage<R,C>
-
Constructor Summary
ConstructorsConstructorDescriptionCommandMessage(MessageId messageId, C payload, Metadata metadata) Creates an instance of aCommandMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.
-
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
-
getMessageId
- Specified by:
getMessageIdin interfaceMessage<R>
-
getPayload
- Specified by:
getPayloadin interfaceMessage<R>
-
getMetadata
- Specified by:
getMetadatain interfaceMessage<R>
-
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
Returns the value of themessageIdrecord component.- Returns:
- the value of the
messageIdrecord component
-
payload
Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-