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 Details

    • clientId

      private final UUID clientId
      The field for the clientId record component.
    • sessionToken

      private final String sessionToken
      The field for the sessionToken record component.
    • currentChannelId

      private final UUID currentChannelId
      The field for the currentChannelId record component.
    • currentChannelName

      private final String currentChannelName
      The field for the currentChannelName record component.
    • metaData

      private final ServerMetaData metaData
      The field for the metaData record component.
  • Constructor Details

    • ServerWelcome

      public ServerWelcome(UUID clientId, String sessionToken, UUID currentChannelId, String currentChannelName, ServerMetaData metaData)
      Creates an instance of a ServerWelcome record class.
      Parameters:
      clientId - the value for the clientId record component
      sessionToken - the value for the sessionToken record component
      currentChannelId - the value for the currentChannelId record component
      currentChannelName - the value for the currentChannelName record component
      metaData - the value for the metaData record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • clientId

      public UUID clientId()
      Returns the value of the clientId record component.
      Returns:
      the value of the clientId record component
    • sessionToken

      public String sessionToken()
      Returns the value of the sessionToken record component.
      Returns:
      the value of the sessionToken record component
    • currentChannelId

      public UUID currentChannelId()
      Returns the value of the currentChannelId record component.
      Returns:
      the value of the currentChannelId record component
    • currentChannelName

      public String currentChannelName()
      Returns the value of the currentChannelName record component.
      Returns:
      the value of the currentChannelName record component
    • metaData

      public ServerMetaData metaData()
      Returns the value of the metaData record component.
      Returns:
      the value of the metaData record component