1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.cb.jset.server;
21
22 import java.rmi.Remote;
23 import java.rmi.RemoteException;
24
25 /***
26 * Remote interface to the GameServer.
27 * <p>
28 * The main method is the {@link #connect(org.cb.jset.server.RemoteSetGamePlayer)} one which
29 * provides the registering client a connection with which it can interact with the current
30 * game.
31 *
32 * @author jerome@coffeebreaks.org - last modified by $LastChangedBy: jerome $
33 * @version $Id: RemoteSetGame.java 117 2004-04-14 23:16:04Z jerome $
34 */
35 public interface RemoteSetGame extends Remote
36 {
37 /***
38 * @param player the remote player
39 * @return the remote game connection
40 * @throws java.rmi.RemoteException upon communication related exception on this remote call
41 * @see org.cb.jset.SetGame#connect(org.cb.jset.SetGamePlayer)
42 */
43 RemoteSetGameConnection connect(RemoteSetGamePlayer player) throws RemoteException;
44
45 /***
46 * @return the game id
47 * @throws java.rmi.RemoteException upon communication related exception on this remote call
48 * @see org.cb.jset.SetGame#getID()
49 */
50 int getID() throws RemoteException;
51
52 /***
53 * @return the game name
54 * @throws java.rmi.RemoteException upon communication related exception on this remote call
55 * @see org.cb.jset.SetGame#getName()
56 */
57 String getName() throws RemoteException;
58
59 /***
60 * @return the max number of players
61 * @throws java.rmi.RemoteException upon communication related exception on this remote call
62 * @see org.cb.jset.SetGame#getMaxNbPlayers()
63 */
64 int getMaxNbPlayers() throws RemoteException;
65
66 /***
67 * @return the current number of players
68 * @throws java.rmi.RemoteException upon communication related exception on this remote call
69 * @see org.cb.jset.SetGame#getCurrentNbPlayers()
70 */
71 int getCurrentNbPlayers() throws RemoteException;
72 }