Record Class PacketPayload.ReconnectRequest
java.lang.Object
java.lang.Record
com.quietterminal.neon.core.PacketPayload.ReconnectRequest
- All Implemented Interfaces:
PacketPayload
- Enclosing interface:
PacketPayload
public static record PacketPayload.ReconnectRequest(long token, int sessionId, byte previousClientId)
extends Record
implements PacketPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface PacketPayload
PacketPayload.Ack, PacketPayload.ConnectAccept, PacketPayload.ConnectDeny, PacketPayload.ConnectRequest, PacketPayload.DisconnectNotice, PacketPayload.GamePacket, PacketPayload.HostRegister, PacketPayload.PacketTypeEntry, PacketPayload.PacketTypeRegistry, PacketPayload.Ping, PacketPayload.Pong, PacketPayload.ReconnectRequest, PacketPayload.SessionConfig -
Field Summary
Fields inherited from interface PacketPayload
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH, MAX_PACKET_COUNT -
Constructor Summary
ConstructorsConstructorDescriptionReconnectRequest(long token, int sessionId, byte previousClientId) Creates an instance of aReconnectRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fromBytes(byte[] data) final inthashCode()Returns a hash code value for this object.byteReturns the value of thepreviousClientIdrecord component.intReturns the value of thesessionIdrecord component.byte[]toBytes()longtoken()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReconnectRequest
public ReconnectRequest(long token, int sessionId, byte previousClientId) Creates an instance of aReconnectRequestrecord class.- Parameters:
token- the value for thetokenrecord componentsessionId- the value for thesessionIdrecord componentpreviousClientId- the value for thepreviousClientIdrecord component
-
-
Method Details
-
toBytes
public byte[] toBytes()- Specified by:
toBytesin interfacePacketPayload
-
fromBytes
-
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 with thecomparemethod from their corresponding wrapper classes. -
token
public long token()Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
sessionId
public int sessionId()Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
previousClientId
public byte previousClientId()Returns the value of thepreviousClientIdrecord component.- Returns:
- the value of the
previousClientIdrecord component
-