Record Class PacketPayload.ConnectAccept
java.lang.Object
java.lang.Record
com.quietterminal.neon.core.PacketPayload.ConnectAccept
- All Implemented Interfaces:
PacketPayload
- Enclosing interface:
PacketPayload
public static record PacketPayload.ConnectAccept(byte clientId, int sessionId, long token)
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
ConstructorsConstructorDescriptionConnectAccept(byte clientId, int sessionId, long token) Creates an instance of aConnectAcceptrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyteclientId()Returns the value of theclientIdrecord component.final booleanIndicates whether some other object is "equal to" this one.static PacketPayload.ConnectAcceptfromBytes(byte[] data) final inthashCode()Returns a hash code value for this object.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
-
ConnectAccept
public ConnectAccept(byte clientId, int sessionId, long token) Creates an instance of aConnectAcceptrecord class.- Parameters:
clientId- the value for theclientIdrecord componentsessionId- the value for thesessionIdrecord componenttoken- the value for thetokenrecord 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. -
clientId
public byte clientId()Returns the value of theclientIdrecord component.- Returns:
- the value of the
clientIdrecord component
-
sessionId
public int sessionId()Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
token
public long token()Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-