Record Class MessageInEvent
java.lang.Object
java.lang.Record
pt.unl.fct.di.novasys.babel2.events.MessageInEvent
- Record Components:
message- the received messagesender- the remote node that sent the message
- All Implemented Interfaces:
BabelEvent, MessageEvent
public record MessageInEvent(BabelMessage message, BabelNode sender)
extends Record
implements MessageEvent
MessageEvent delivered when a BabelMessage arrives from a
remote node.
Protocols handle inbound messages by annotating methods with
@UponMessageIn.
The handler method's first parameter type determines which message type it
handles.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageInEvent(BabelMessage message, BabelNode sender) Creates an instance of aMessageInEventrecord 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.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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
Returns the value of themessagerecord component.- Specified by:
messagein interfaceMessageEvent- Returns:
- the value of the
messagerecord component
-
sender
-