Class ClientDisconnected
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.ClientDisconnected
- All Implemented Interfaces:
Serializable
This Response is generated when a lobby's client disconnected and is sent to the lobby's clients.
Therefore, it is
FixedStatusResponse
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionClientDisconnected
(String lastDisconnectedNickname, List<String> players) Create the response -
Method Summary
Modifier and TypeMethodDescriptionGet the user that generated this response by disconnectingGet the players still 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:
-
lastDisconnectedNickname
-
players
-
-
Constructor Details
-
ClientDisconnected
Create the response- Parameters:
lastDisconnectedNickname
- the nickname of the player that just disconnectedplayers
- the list of still connected players
-
-
Method Details
-
getPlayers
Get the players still connected to the lobby- Returns:
- an Unmodifiable
List
containing players still in the lobby
-
getLastDisconnectedNickname
Get the user that generated this response by disconnecting- Returns:
- the nickname of the user that just disconnected from the lobby
-