Class LobbyServerAccept
java.lang.Object
it.polimi.ingsw.Server.Messages.Message
it.polimi.ingsw.Server.Messages.ServerResponses.Response
it.polimi.ingsw.Server.Messages.ServerResponses.LobbyServerAccept
- All Implemented Interfaces:
Serializable
A
Response
to represent the output the controller gave on a previous
DeclarePlayerRequest
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final long
-
Constructor Summary
ModifierConstructorDescriptionprivate
LobbyServerAccept
(StatusCode statusCode, List<LobbyInfo> openLobbies) Construct the response -
Method Summary
Modifier and TypeMethodDescriptionstatic LobbyServerAccept
fail()
Returns a failed status code responseGet a list of the open lobbies the client may joinstatic LobbyServerAccept
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:
-
publicLobbies
-
-
Constructor Details
-
LobbyServerAccept
Construct the response- Parameters:
statusCode
- the status code of the responseopenLobbies
- aList
of open lobbies the client may join or null if the response is negative
-
-
Method Details
-
fail
Returns a failed status code response- Returns:
- a failed status code response
-
success
Returns a successful status code response- Parameters:
openLobbies
- aList
of open lobbies the client may join- Returns:
- a successful status code response
-
getPublicLobbies
Get a list of the open lobbies the client may join- Returns:
- a
List
of open lobbies the client may join or null ifResponse.getStatusCode()
isStatusCode.Fail
-