Package it.polimi.ingsw.Client
Class RMIClient
java.lang.Object
it.polimi.ingsw.Client.RMIClient
- All Implemented Interfaces:
RMIClientInterface
RMI Client abstraction, attached to terminal and GUI views
- Author:
- Gruppo AM34
-
Field Summary
Modifier and TypeFieldDescriptionprivate RMIControllerInterface
private static final int
private ClientStatus
private static final ExecutorService
private boolean
(package private) AtomicBoolean
private static OutputAbstraction
private static int
private final int
private static String
private static final TerminalAbstraction
private static final BufferedReader
private static final PrintWriter
private static boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
Sends informative achievements update messagesboolean
evolve()
Client's evolution implementationprivate boolean
Shows game's Final Scoreboardprivate boolean
Notifies players of a forced game end, related to a client unexpected disconnectionprivate boolean
Move creation phase, updated effective Modelprivate boolean
lastTurn()
Notifies players of the last turn, related to a client unexpected disconnectionprivate boolean
login()
Login strategystatic void
Main method, welcoming Clientprivate boolean
-
Field Details
-
countParameters
private static final int countParameters- See Also:
-
terminalOutput
-
terminalInput
-
ta
-
executors
-
PORT
private static int PORT -
serverName
-
useGUI
private static boolean useGUI -
oa
-
cs
-
controller
-
firstTime
private boolean firstTime -
SEC_TIMEOUT
private final int SEC_TIMEOUT- See Also:
-
lifelineFlag
AtomicBoolean lifelineFlag
-
-
Constructor Details
-
RMIClient
RMI Client declaration- Parameters:
args
- default arguments array
-
-
Method Details
-
main
Main method, welcoming Client- Parameters:
args
- default arguments array
-
evolve
public boolean evolve()Client's evolution implementation- Specified by:
evolve
in interfaceRMIClientInterface
- Returns:
- desire to continue login (otherwise ignored)
-
login
Login strategy- Returns:
- conventionally, true if client's intention is to continue login actions, false otherwise
- Throws:
RemoteException
- Related to RMI
-
formulateMove
Move creation phase, updated effective Model- Returns:
- true (ignored)
- Throws:
RemoteException
- related to RMIException
-
notYourTurn
- Throws:
Exception
-
forcedGameEnd
private boolean forcedGameEnd()Notifies players of a forced game end, related to a client unexpected disconnection- Returns:
- true (ignored)
-
lastTurn
private boolean lastTurn()Notifies players of the last turn, related to a client unexpected disconnection- Returns:
- true (ignored)
-
finalScoreBoard
Shows game's Final Scoreboard- Returns:
- true (ignored)
- Throws:
RemoteException
- related to RMI
-
achievementsUpdate
Sends informative achievements update messages- Returns:
- true (ignored)
- Throws:
RemoteException
- related to RMI
-