Record Class ReconnectStateChangedEvent
java.lang.Object
java.lang.Record
com.botwithus.bot.api.event.ReconnectStateChangedEvent
- Record Components:
connectionName- the originating connection namestate- the new state — exhaustively switchabletimestamp- event creation time in milliseconds since epoch
- All Implemented Interfaces:
GameEvent
public record ReconnectStateChangedEvent(String connectionName, ReconnectState state, long timestamp)
extends Record
implements GameEvent
Fired whenever the
ReconnectController transitions between
ReconnectState variants. The notification overlay subscribes to
this event to render banners during reconnect activity.-
Constructor Summary
ConstructorsConstructorDescriptionReconnectStateChangedEvent(String connectionName, ReconnectState state) ReconnectStateChangedEvent(String connectionName, ReconnectState state, long timestamp) Creates an instance of aReconnectStateChangedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectionNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.state()Returns the value of thestaterecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReconnectStateChangedEvent
-
ReconnectStateChangedEvent
Creates an instance of aReconnectStateChangedEventrecord class.- Parameters:
connectionName- the value for theconnectionNamerecord componentstate- the value for thestaterecord componenttimestamp- the value for thetimestamprecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
connectionName
Returns the value of theconnectionNamerecord component.- Returns:
- the value of the
connectionNamerecord component
-
state
-
timestamp
-