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 * Interface for the clients to play remotely a jset game.
27 * Defines the callbacks hooks made from the RemoteSetGame implementation to the remote client
28 * implementing this interface.
29 * <p>
30 * @see RemoteSetGame#connect(org.cb.jset.server.RemoteSetGamePlayer)
31 * @author jerome@coffeebreaks.org - last modified by $LastChangedBy: jerome $
32 * @version $Id: RemoteSetGamePlayer.java 118 2004-04-14 23:17:27Z jerome $
33 */
34 public interface RemoteSetGamePlayer extends Remote, org.cb.jset.server.RemoteSetGameBoardListener
35 {
36 /***
37 * @return the name of the player.
38 * @throws java.rmi.RemoteException upon communication related exception on this remote call
39 * @see org.cb.jset.SetGamePlayer#getName()
40 */
41 String getName() throws RemoteException;
42
43 /***
44 * Called by a game when the player should be blocked.
45 * @throws java.rmi.RemoteException upon communication related exception on this remote call
46 * @see org.cb.jset.SetGamePlayer#block()
47 */
48 void block() throws RemoteException;
49
50 /***
51 * Called by a game when the player should be unblocked.
52 * @throws java.rmi.RemoteException upon communication related exception on this remote call
53 * @see org.cb.jset.SetGamePlayer#unblock()
54 */
55 void unblock() throws RemoteException;
56
57 /***
58 * A blocked player doesn't have the right to play.
59 * @return <code>true</code> is the player is blocked, <code>false</code> otherwise.
60 * @throws java.rmi.RemoteException upon communication related exception on this remote call
61 * @see org.cb.jset.SetGamePlayer#isBlocked()
62 */
63 boolean isBlocked() throws RemoteException;
64
65 /***
66 * Called to notify a disconnection from a game.
67 * @throws java.rmi.RemoteException upon communication related exception on this remote call
68 * @see org.cb.jset.SetGamePlayer#disconnect()
69 */
70 void disconnect() throws RemoteException;
71 }