Class ClientConnected
java.lang.Object
it.polimi.ingsw.Server.Messages.Message
it.polimi.ingsw.Server.Messages.ServerResponses.Response
it.polimi.ingsw.Server.Messages.ServerResponses.FixedStatusResponse
it.polimi.ingsw.Server.Messages.ServerResponses.ClientConnected
- All Implemented Interfaces:
Serializable
This Response is generated when a lobby's client connects and is sent to the lobby's clients.
Therefore, it is
FixedStatusResponse
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionClientConnected
(String lastConnectedNickname, List<String> players) Create the response -
Method Summary
Modifier and TypeMethodDescriptionGet the user that generated this response by connectingGet the players connected to the lobbyMethods inherited from class it.polimi.ingsw.Server.Messages.ServerResponses.Response
getStatusCode
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
lastConnectedNickname
-
players
-
-
Constructor Details
-
ClientConnected
Create the response- Parameters:
lastConnectedNickname
- the nickname of the player that just connectedplayers
- the list of all connected players
-
-
Method Details
-
getLastConnectedNickname
Get the user that generated this response by connecting- Returns:
- the nickname of the user that just connected to the lobby
-
getPlayers
Get the players connected to the lobby- Returns:
- an Unmodifiable
List
containing all players in the lobby
-