# Class SetUuidCommand

java.lang.Object
it.polimi.ingsw.is25am31.network.socket.serverClientMessages.SetUuidCommand

All Implemented Interfaces:
  `ServerClientCommand`, `Serializable`

public class SetUuidCommand extends Object implements ServerClientCommand, Serializable
Represents a command sent from the server to the client to set the client's UUID.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SetUuidCommand(UUID uuid)`
  Constructs a new `SetUuidCommand` with the specified UUID.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `execute(SocketClient client)`
  Executes the command on the `SocketClient`, instructing it to set its UUID.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SetUuidCommand

    public SetUuidCommand(UUID uuid)
    Constructs a new `SetUuidCommand` with the specified UUID.
    Parameters:
      `uuid` - The UUID to be set on the client.

- ## Method Details

  - ### execute

    public void execute(SocketClient client) throws Exception
    Executes the command on the `SocketClient`, instructing it to set its UUID.
    Specified by:
      `execute` in interface `ServerClientCommand`
    Parameters:
      `client` - The `SocketClient` instance to execute the command on.
    Throws:
      `Exception` - if an error occurs during UUID setting.