Record Class MulticastMessageEnvelope

java.lang.Object
java.lang.Record
org.j7m.middleware.registry.mcast.MulticastMessageEnvelope
Record Components:
messageType - envelope message type
senderId - sender registry id
receiverId - receiver id or *
contextId - registry context
questionId - correlation id
queryType - query type
createdAtMillis - creation timestamp
ttlMillis - message TTL
depth - hop depth
protocolVersion - protocol version
metadata - 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 Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • messageType

      public MulticastMessageType messageType()
      Returns the value of the messageType record component.
      Returns:
      the value of the messageType record component
    • senderId

      public String senderId()
      Returns the value of the senderId record component.
      Returns:
      the value of the senderId record component
    • receiverId

      public String receiverId()
      Returns the value of the receiverId record component.
      Returns:
      the value of the receiverId record component
    • contextId

      public String contextId()
      Returns the value of the contextId record component.
      Returns:
      the value of the contextId record component
    • questionId

      public String questionId()
      Returns the value of the questionId record component.
      Returns:
      the value of the questionId record component
    • queryType

      public MulticastQueryType queryType()
      Returns the value of the queryType record component.
      Returns:
      the value of the queryType record component
    • createdAtMillis

      public long createdAtMillis()
      Returns the value of the createdAtMillis record component.
      Returns:
      the value of the createdAtMillis record component
    • ttlMillis

      public long ttlMillis()
      Returns the value of the ttlMillis record component.
      Returns:
      the value of the ttlMillis record component
    • depth

      public int depth()
      Returns the value of the depth record component.
      Returns:
      the value of the depth record component
    • protocolVersion

      public int protocolVersion()
      Returns the value of the protocolVersion record component.
      Returns:
      the value of the protocolVersion record component
    • metadata

      public Map<String,String> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component