Interface RMIControllerInterface

All Superinterfaces:
Remote
All Known Implementing Classes:
RMIController

public interface RMIControllerInterface extends Remote
RMI Controller Interface
  • Method Details

    • identifierExists

      boolean identifierExists(String identifier) throws RemoteException
      Parameters:
      identifier - Game's identifier
      Returns:
      whether the identifier exists
      Throws:
      RemoteException - related to RMI
    • nicknameExists

      boolean nicknameExists(String identifier, String nickname) throws RemoteException
      Parameters:
      identifier - Game's identifier
      nickname - Player's nickname
      Returns:
      whether the nickname exists in the given Game's identifier
      Throws:
      RemoteException - related to RMI
    • createGame

      boolean createGame(String identifier, ClientStatusInterface csi) throws RemoteException
      Creates a game using the corresponding identifier
      Parameters:
      identifier - Game's identifier
      csi - Client Status Interface
      Returns:
      true if the Game have been correctly created
      Throws:
      RemoteException - related to RMI
    • acceptPlayer

      boolean acceptPlayer(String identifier, String nickname, int maxPlayers) throws Exception
      Admission phase
      Parameters:
      identifier - Game's identifier
      nickname - Player's nickname
      maxPlayers - Maximum number of players for the game used only if the first player is being accepted to the game. It is ignored otherwise.
      Returns:
      true if the admission process have been correctly completed
      Throws:
      Exception - related to Model management
    • reEnterGame

      boolean reEnterGame(String identifier, String nickname) throws RemoteException
      Game's re-enter strategy
      Parameters:
      identifier - Game's identifier
      nickname - Player's nickname
      Returns:
      action validity
      Throws:
      RemoteException - related to RMI