Record Class MulticastMessageEnvelope
java.lang.Object
java.lang.Record
org.j7m.middleware.registry.mcast.MulticastMessageEnvelope
- Record Components:
messageType- envelope message typesenderId- sender registry idreceiverId- receiver id or*contextId- registry contextquestionId- correlation idqueryType- query typecreatedAtMillis- creation timestampttlMillis- message TTLdepth- hop depthprotocolVersion- protocol versionmetadata- public metadata
public record MulticastMessageEnvelope(MulticastMessageType messageType, String senderId, String receiverId, String contextId, String questionId, MulticastQueryType queryType, long createdAtMillis, long ttlMillis, int depth, int protocolVersion, Map<String,String> metadata)
extends Record
Immutable multicast message envelope.
-
Constructor Summary
ConstructorsConstructorDescriptionMulticastMessageEnvelope(MulticastMessageType messageType, String senderId, String receiverId, String contextId, String questionId, MulticastQueryType queryType, long createdAtMillis, long ttlMillis, int depth, int protocolVersion, Map<String, String> metadata) Creates an immutable envelope. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontextIdrecord component.longReturns the value of thecreatedAtMillisrecord component.intdepth()Returns the value of thedepthrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themessageTyperecord component.metadata()Returns the value of themetadatarecord component.intReturns the value of theprotocolVersionrecord component.Returns the value of thequeryTyperecord component.Returns the value of thequestionIdrecord component.Returns the value of thereceiverIdrecord component.senderId()Returns the value of thesenderIdrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thettlMillisrecord component.
-
Constructor Details
-
MulticastMessageEnvelope
public MulticastMessageEnvelope(MulticastMessageType messageType, String senderId, String receiverId, String contextId, String questionId, MulticastQueryType queryType, long createdAtMillis, long ttlMillis, int depth, int protocolVersion, Map<String, String> metadata) Creates an immutable envelope.
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
messageType
Returns the value of themessageTyperecord component.- Returns:
- the value of the
messageTyperecord component
-
senderId
-
receiverId
Returns the value of thereceiverIdrecord component.- Returns:
- the value of the
receiverIdrecord component
-
contextId
-
questionId
Returns the value of thequestionIdrecord component.- Returns:
- the value of the
questionIdrecord component
-
queryType
-
createdAtMillis
public long createdAtMillis()Returns the value of thecreatedAtMillisrecord component.- Returns:
- the value of the
createdAtMillisrecord component
-
ttlMillis
-
depth
-
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
metadata
-