Class LobbyConnected
java.lang.Object
it.polimi.ingsw.Server.Messages.Message
it.polimi.ingsw.Server.Messages.ServerResponses.Response
it.polimi.ingsw.Server.Messages.ServerResponses.LobbyConnected
- All Implemented Interfaces:
Serializable
A
Response
to represent the output the controller gave on a previous ConnectLobbyRequest
or
CreateLobbyRequest
- See Also:
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
LobbyConnected
(StatusCode statusCode, UUID lobbyID, String admin) Construct the response -
Method Summary
Modifier and TypeMethodDescriptionstatic LobbyConnected
fail()
Returns a failed status code responsegetAdmin()
Get the admin of the lobbyGet the id of the lobbystatic LobbyConnected
Returns a successful status code responseMethods inherited from class it.polimi.ingsw.Server.Messages.ServerResponses.Response
getStatusCode
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
lobbyID
-
admin
-
-
Constructor Details
-
LobbyConnected
Construct the response- Parameters:
statusCode
- the status code of the responselobbyID
- the UUID of the lobbyadmin
- the admin of the lobby
-
-
Method Details
-
fail
Returns a failed status code response- Returns:
- a failed status code response
-
success
Returns a successful status code response- Parameters:
lobbyID
- the UUID of the successfully connected to lobbyadmin
- the admin of the lobby- Returns:
- a successful status code response
-
getLobbyID
Get the id of the lobby- Returns:
- the UUID of the lobby or null if no lobby was linked to the response
-
getAdmin
Get the admin of the lobby- Returns:
- the nickname of the admin of the lobby or null if no lobby was linked to the response
-