Record Class JvmPubSubMessage
java.lang.Object
java.lang.Record
org.chenile.pubsub.jvm.model.JvmPubSubMessage
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.payload()Returns the value of thepayloadrecord component.topic()Returns the value of thetopicrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
topic
The field for thetopicrecord component. -
payload
The field for thepayloadrecord component. -
headers
-
createdAt
The field for thecreatedAtrecord component.
-
-
Constructor Details
-
JvmPubSubMessage
public JvmPubSubMessage(String topic, String payload, Map<String, Object> headers, Instant createdAt) Creates an instance of aJvmPubSubMessagerecord class.- Parameters:
topic- the value for thetopicrecord componentpayload- the value for thepayloadrecord componentheaders- the value for theheadersrecord componentcreatedAt- the value for thecreatedAtrecord component
-
-
Method Details
-
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). -
topic
Returns the value of thetopicrecord component.- Returns:
- the value of the
topicrecord component
-
payload
Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-
headers
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
CHENILE