Package it.polimi.ingsw.Common
Interface RMIControllerInterface
- All Superinterfaces:
Remote
- All Known Implementing Classes:
RMIController
RMI Controller Interface
-
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptPlayer
(String identifier, String nickname, int maxPlayers) Admission phaseboolean
createGame
(String identifier, ClientStatusInterface csi) Creates a game using the corresponding identifierboolean
identifierExists
(String identifier) boolean
nicknameExists
(String identifier, String nickname) boolean
reEnterGame
(String identifier, String nickname) Game's re-enter strategy
-
Method Details
-
identifierExists
- Parameters:
identifier
- Game's identifier- Returns:
- whether the identifier exists
- Throws:
RemoteException
- related to RMI
-
nicknameExists
- Parameters:
identifier
- Game's identifiernickname
- Player's nickname- Returns:
- whether the nickname exists in the given Game's identifier
- Throws:
RemoteException
- related to RMI
-
createGame
Creates a game using the corresponding identifier- Parameters:
identifier
- Game's identifiercsi
- Client Status Interface- Returns:
- true if the Game have been correctly created
- Throws:
RemoteException
- related to RMI
-
acceptPlayer
Admission phase- Parameters:
identifier
- Game's identifiernickname
- Player's nicknamemaxPlayers
- 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
Game's re-enter strategy- Parameters:
identifier
- Game's identifiernickname
- Player's nickname- Returns:
- action validity
- Throws:
RemoteException
- related to RMI
-