Record Class AddressedBabelMessage
java.lang.Object
java.lang.Record
pt.unl.fct.di.novasys.babel2.channels.udp.AddressedBabelMessage
- Record Components:
message- the received application or framework messagesender- the node identity of the sendersenderAddress- the socket address from which the message was received
public record AddressedBabelMessage(BabelMessage message, BabelNode sender, InetSocketAddress senderAddress)
extends Record
Envelope holding a deserialized
BabelMessage alongside the sender node identity and physical source address.-
Constructor Summary
ConstructorsConstructorDescriptionAddressedBabelMessage(BabelMessage message, BabelNode sender, InetSocketAddress senderAddress) Creates an instance of aAddressedBabelMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.sender()Returns the value of thesenderrecord component.Returns the value of thesenderAddressrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AddressedBabelMessage
public AddressedBabelMessage(BabelMessage message, BabelNode sender, InetSocketAddress senderAddress) Creates an instance of aAddressedBabelMessagerecord class.- Parameters:
message- the value for themessagerecord componentsender- the value for thesenderrecord componentsenderAddress- the value for thesenderAddressrecord 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). -
message
-
sender
-
senderAddress
Returns the value of thesenderAddressrecord component.- Returns:
- the value of the
senderAddressrecord component
-