View Javadoc

1   // START LICENSE
2   // JSet - a Java JSet card board game implementation
3   // Copyright (C) 2004 Jerome Lacoste
4   //
5   // This program is free software; you can redistribute it and/or modify
6   // it under the terms of the GNU General Public License as published by
7   // the Free Software Foundation; either version 2 of the License, or (at
8   // your option) any later version.
9   //
10  // This program is distributed in the hope that it will be useful, but
11  // WITHOUT ANY WARRANTY; without even the implied warranty of
12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  // General Public License for more details.
14  //
15  // You should have received a copy of the GNU General Public License
16  // along with this program; if not, write to the Free Software
17  // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18  // END LICENSE
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  }