Module concord_core
Record Class ServerWelcome
java.lang.Object
java.lang.Record
nl.andrewl.concord_core.msg.types.client_setup.ServerWelcome
- Record Components:
clientId
- The unique id of this client.sessionToken
- The token which this client can use to reconnect to the server later and still be recognized as the same user.currentChannelId
- The id of the channel that the user is placed in.currentChannelName
- The name of the channel that the user is placed in.metaData
- Information about the server's structure.
- All Implemented Interfaces:
Message
public record ServerWelcome(UUID clientId, String sessionToken, UUID currentChannelId, String currentChannelName, ServerMetaData metaData)
extends Record
implements Message
This message is sent from the server to the client after the server accepts
the client's identification and registers the client in the server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final UUID
The field for theclientId
record component.private final UUID
The field for thecurrentChannelId
record component.private final String
The field for thecurrentChannelName
record component.private final ServerMetaData
The field for themetaData
record component.private final String
The field for thesessionToken
record component. -
Constructor Summary
ConstructorsConstructorDescriptionServerWelcome
(UUID clientId, String sessionToken, UUID currentChannelId, String currentChannelName, ServerMetaData metaData) Creates an instance of aServerWelcome
record class. -
Method Summary
Modifier and TypeMethodDescriptionclientId()
Returns the value of theclientId
record component.Returns the value of thecurrentChannelId
record component.Returns the value of thecurrentChannelName
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.metaData()
Returns the value of themetaData
record component.Returns the value of thesessionToken
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.andrewl.concord_core.msg.Message
byteSize, getTypeSerializer
-
Field Details
-
clientId
The field for theclientId
record component. -
sessionToken
The field for thesessionToken
record component. -
currentChannelId
The field for thecurrentChannelId
record component. -
currentChannelName
The field for thecurrentChannelName
record component. -
metaData
The field for themetaData
record component.
-
-
Constructor Details
-
ServerWelcome
public ServerWelcome(UUID clientId, String sessionToken, UUID currentChannelId, String currentChannelName, ServerMetaData metaData) Creates an instance of aServerWelcome
record class.- Parameters:
clientId
- the value for theclientId
record componentsessionToken
- the value for thesessionToken
record componentcurrentChannelId
- the value for thecurrentChannelId
record componentcurrentChannelName
- the value for thecurrentChannelName
record componentmetaData
- the value for themetaData
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
clientId
Returns the value of theclientId
record component.- Returns:
- the value of the
clientId
record component
-
sessionToken
Returns the value of thesessionToken
record component.- Returns:
- the value of the
sessionToken
record component
-
currentChannelId
Returns the value of thecurrentChannelId
record component.- Returns:
- the value of the
currentChannelId
record component
-
currentChannelName
Returns the value of thecurrentChannelName
record component.- Returns:
- the value of the
currentChannelName
record component
-
metaData
Returns the value of themetaData
record component.- Returns:
- the value of the
metaData
record component
-