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
FieldsModifier and TypeFieldDescriptionprivate static final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLobbyServerAccept(StatusCode statusCode, List<LobbyInfo> openLobbies) Construct the response -
Method Summary
Modifier and TypeMethodDescriptionstatic LobbyServerAcceptfail()Returns a failed status code responseGet a list of the open lobbies the client may joinstatic LobbyServerAcceptReturns 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- aListof 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- aListof 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
Listof open lobbies the client may join or null ifResponse.getStatusCode()isStatusCode.Fail
-