game.multiplayer.invitation
Interface Invitation

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

public interface Invitation
extends java.rmi.Remote

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

Author:
Chris Barton

Method Summary
 Invite getInvite()
          Returns the current invite.
 void initializeGame(boolean initialize)
          Initializes the game to be created out of the invite and sends it to the server to be processed.
 void makeDecision(Client client, boolean decision)
          Notifies the host of the decision that an invited client has made to either accept of decline.
 boolean ready()
          Returns true if the Invitation is ready and all have accepted, else returns false.
 

Method Detail

makeDecision

void makeDecision(Client client,
                  boolean decision)
                  throws java.rmi.RemoteException
Notifies the host of the decision that an invited client has made to either accept of decline.

Parameters:
client - Client - Invitee client.
decision - boolean - Invitee decision for the invite. -> true => Accepts Invite -> false => Declines Invite
Throws:
java.rmi.RemoteException

initializeGame

void initializeGame(boolean initialize)
                    throws java.rmi.RemoteException
Initializes the game to be created out of the invite and sends it to the server to be processed.

Parameters:
initialize - - boolean - Determines whether or not to start the game or cancel the invite.
Throws:
java.rmi.RemoteException

ready

boolean ready()
              throws java.rmi.RemoteException
Returns true if the Invitation is ready and all have accepted, else returns false.

Returns:
boolean true => ready; false => not ready.
Throws:
java.rmi.RemoteException

getInvite

Invite getInvite()
                 throws java.rmi.RemoteException
Returns the current invite.

Returns:
Invite
Throws:
java.rmi.RemoteException