Record Class BabelNodeAnswer
java.lang.Object
java.lang.Record
pt.unl.fct.di.novasys.babel2.protocols.discovery.messages.BabelNodeAnswer
- Record Components:
node- the identity of the node respondingopenChannels- list of open channels and their bound addresses
- All Implemented Interfaces:
BabelMessage
public record BabelNodeAnswer(BabelNode node, List<ChannelInfo> openChannels)
extends Record
implements BabelMessage
Discovery message sent in response to a probe, announcing active channels and addresses of the node.
-
Constructor Summary
ConstructorsConstructorDescriptionBabelNodeAnswer(BabelNode node, List<ChannelInfo> openChannels) Creates an instance of aBabelNodeAnswerrecord 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.node()Returns the value of thenoderecord component.Returns the value of theopenChannelsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BabelNodeAnswer
Creates an instance of aBabelNodeAnswerrecord class.- Parameters:
node- the value for thenoderecord componentopenChannels- the value for theopenChannelsrecord 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). -
node
-
openChannels
Returns the value of theopenChannelsrecord component.- Returns:
- the value of the
openChannelsrecord component
-