# Class PutDownComponentCommand

java.lang.Object
it.polimi.ingsw.is25am31.network.socket.clientServerMessages.PutDownComponentCommand

All Implemented Interfaces:
  `ClientServerCommand`, `Serializable`

public class PutDownComponentCommand extends Object implements ClientServerCommand, Serializable
Represents a command sent from the client to the server to put down a component.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PutDownComponentCommand(UUID clientId, Component component)`
  Constructs a new `PutDownComponentCommand`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `execute(SocketServer server)`
  Executes the command on the `SocketServer`, instructing it to handle the logic for putting down the specified component for the client identified by `clientId`.

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

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

- ## Constructor Details

  - ### PutDownComponentCommand

    public PutDownComponentCommand(UUID clientId, Component component)
    Constructs a new `PutDownComponentCommand`.
    Parameters:
      `clientId` - The unique identifier of the client putting down the component.
      `component` - The `Component` to be put down.

- ## Method Details

  - ### execute

    public void execute(SocketServer server) throws Exception
    Executes the command on the `SocketServer`, instructing it to handle the logic for putting down the specified component for the client identified by `clientId`.
    Specified by:
      `execute` in interface `ClientServerCommand`
    Parameters:
      `server` - The `SocketServer` instance on which the command will be executed.
    Throws:
      `Exception` - if an error occurs during the component manipulation on the server.