Class LobbyConnected

All Implemented Interfaces:
Serializable

public class LobbyConnected extends Response
A Response to represent the output the controller gave on a previous ConnectLobbyRequest or CreateLobbyRequest
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • lobbyID

      private final UUID lobbyID
    • admin

      private final String admin
  • Constructor Details

    • LobbyConnected

      private LobbyConnected(StatusCode statusCode, UUID lobbyID, String admin)
      Construct the response
      Parameters:
      statusCode - the status code of the response
      lobbyID - the UUID of the lobby
      admin - the admin of the lobby
  • Method Details

    • fail

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

      public static LobbyConnected success(UUID lobbyID, String admin)
      Returns a successful status code response
      Parameters:
      lobbyID - the UUID of the successfully connected to lobby
      admin - the admin of the lobby
      Returns:
      a successful status code response
    • getLobbyID

      public UUID getLobbyID()
      Get the id of the lobby
      Returns:
      the UUID of the lobby or null if no lobby was linked to the response
    • getAdmin

      public String 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