net.bluebones.boggle
Interface IClient

All Superinterfaces:
Remote
All Known Implementing Classes:
Client

public interface IClient
extends Remote

Interface exposing remote methods available on a Boggle client. TODO notes about rmic and how this works.

Version:
0.3 $Revision: 1.3 $
Author:
Thomas David Baker

Method Summary
 boolean isActive(GameId gameId)
          Determines if this Client is actively connected to the specified game.
 void results(Round round, Rubber rubber)
          Notifies the client of the results of a game which are then processed by this method.
 void setRubber(Rubber rubber)
          Sends the current rubber details to the client.
 void startGame(char[][] letters, int timeInSecs, GameId gameId)
          Notifies the client to initialise the board and start the timer.
 

Method Detail

startGame

void startGame(char[][] letters,
               int timeInSecs,
               GameId gameId)
               throws RemoteException
Notifies the client to initialise the board and start the timer.

Parameters:
letters - Letters to initialise the board with.
timeInSecs - Time of game in seconds.
gameId - Universally unique identifier for this game.
Throws:
RemoteException - If anything goes wrong with the RMI.

results

void results(Round round,
             Rubber rubber)
             throws RemoteException
Notifies the client of the results of a game which are then processed by this method.

Parameters:
round - Results of a round of Boggle.
rubber - Details of the rubber.
Throws:
RemoteException - If anything goes wrong with the RMI.

isActive

boolean isActive(GameId gameId)
                 throws RemoteException
Determines if this Client is actively connected to the specified game.

Parameters:
gameId - GameID of game to check for participation in.
Returns:
Returns true if playing the game represented by gameId.
Throws:
RemoteException - If anything goes wrong with the RMI.

setRubber

void setRubber(Rubber rubber)
               throws RemoteException
Sends the current rubber details to the client. The implication of this method being called is that there may have been a change and something on the client may need updating (score table, etc.)

Parameters:
rubber - Rubber details of the current rubber.
Throws:
RemoteException - If anything goes wrong with the RMI.