server
Interface WordMoleServer

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
WordMoleServerImpl

public interface WordMoleServer
extends java.rmi.Remote

This interface represents the WordMoleServer of the Remote Interface for the WordMoleServer.

Author:
Chris Barton

Method Summary
 void createGame(Game game)
          Creates a game to be initialized.
 Invitation createInvite(Invite invite)
          Creates an invite to be sent to all of the invitees.
 void postMessage(Client sender, java.lang.String message)
          Sends a message to all of the clients connected.
 void register(WordMoleClient client, Client name, boolean connected)
          Registers a WordMoleClient with the WordMoleServer
 void reregister(Client name)
          Reconnects a client from a game to the lobby.
 

Method Detail

register

void register(WordMoleClient client,
              Client name,
              boolean connected)
              throws java.rmi.RemoteException
Registers a WordMoleClient with the WordMoleServer

Parameters:
client - - WordMoleClient to register
name - - client of the WordMoleClient
connected - - boolean of whether the client is connected or disconnected.
Throws:
java.rmi.RemoteException

reregister

void reregister(Client name)
                throws java.rmi.RemoteException
Reconnects a client from a game to the lobby.

Parameters:
name - - Client the client
Throws:
java.rmi.RemoteException

createInvite

Invitation createInvite(Invite invite)
                        throws java.rmi.RemoteException
Creates an invite to be sent to all of the invitees.

Parameters:
invite - - Invite with all of the invitees.
Returns:
Invitation stub
Throws:
java.rmi.RemoteException

createGame

void createGame(Game game)
                throws java.rmi.RemoteException
Creates a game to be initialized.

Parameters:
game - - The game to be started.
Throws:
java.rmi.RemoteException

postMessage

void postMessage(Client sender,
                 java.lang.String message)
                 throws java.rmi.RemoteException
Sends a message to all of the clients connected.

Parameters:
sender - - client of the sender.
message - - Message to be posted.
Throws:
java.rmi.RemoteException