Class LobbyServerAccept

All Implemented Interfaces:
Serializable

public class LobbyServerAccept extends Response
A Response to represent the output the controller gave on a previous DeclarePlayerRequest
See Also:
  • Field Details

  • Constructor Details

    • LobbyServerAccept

      private LobbyServerAccept(StatusCode statusCode, List<LobbyInfo> openLobbies)
      Construct the response
      Parameters:
      statusCode - the status code of the response
      openLobbies - a List of open lobbies the client may join or null if the response is negative
  • Method Details

    • fail

      public static LobbyServerAccept fail()
      Returns a failed status code response
      Returns:
      a failed status code response
    • success

      public static LobbyServerAccept success(List<LobbyInfo> openLobbies)
      Returns a successful status code response
      Parameters:
      openLobbies - a List of open lobbies the client may join
      Returns:
      a successful status code response
    • getPublicLobbies

      public List<LobbyInfo> getPublicLobbies()
      Get a list of the open lobbies the client may join
      Returns:
      a List of open lobbies the client may join or null if Response.getStatusCode() is StatusCode.Fail