Record Class ConnectionDownEvent
java.lang.Object
java.lang.Record
pt.unl.fct.di.novasys.babel2.events.ConnectionDownEvent
- Record Components:
node- the remote node whose connection was lostcause- the exception that caused the disconnection, ornullif the disconnection was initiated deliberately
- All Implemented Interfaces:
BabelEvent, NetworkEvent
public record ConnectionDownEvent(BabelNode node, @Nullable Throwable cause)
extends Record
implements NetworkEvent
NetworkEvent delivered to a protocol when a previously established
connection to node has been closed.
This event triggers the BabelProtocol#connectionDown callback.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionDownEvent(BabelNode node, @Nullable Throwable cause) Creates an instance of aConnectionDownEventrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Throwablecause()Returns the value of thecauserecord component.final 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.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConnectionDownEvent
-
-
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
Returns the value of thenoderecord component.- Specified by:
nodein interfaceNetworkEvent- Returns:
- the value of the
noderecord component
-
cause
-