|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface ClientInterface is an interface through which the
server executes remote calls to the client.
Inherits the Remote interface. Class Tracksail
implements the ClientInterface interface.
Thus, ClientInterface provides the RMI functionality of making
remote calls directly from the server to the client.
The server receives an object that implements ClientInterface as
a remote call from the client. The client first gets a remote object of the
server from RMI and then first calls the loginPlayer method,
which delivers client's own remote object to the server.
Tracksail,
ServerInterface| Method Summary | |
void |
gameStateChange(boolean racing)
Gives a player the race state when it changes (racing/paused). |
void |
kick(java.lang.String message)
Kicks a player out. |
void |
sendText(java.lang.String str)
Sends a text message to the client. |
void |
updateGameList(GameInfo[] ri)
Gives the client an updated race list. |
void |
updateTrackList(java.lang.String[] tracks)
Gives the client an updated track list. |
| Method Detail |
public void sendText(java.lang.String str)
throws java.rmi.RemoteException
str - the message to send
java.rmi.RemoteException
public void kick(java.lang.String message)
throws java.rmi.RemoteException
message - an informational message to print on the console
java.rmi.RemoteException
public void updateGameList(GameInfo[] ri)
throws java.rmi.RemoteException
This is called for all players if a new race is created or an existing race is closed. This is also always called for a player when (s)he signs in to the server.
ri - the race list to give
java.rmi.RemoteException
public void updateTrackList(java.lang.String[] tracks)
throws java.rmi.RemoteException
This is called for all players always when the track list changes. This is also always called for a player when (s)he signs in to the server.
tracks - the track list to give
java.rmi.RemoteException
public void gameStateChange(boolean racing)
throws java.rmi.RemoteException
The server calls this e.g. when a race begins or ends. Game Master can e.g. disable the "start" button when a race begins/ends.
racing - true if the race begun, false if it ended
java.rmi.RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||