rl.client
Class Client

java.lang.Object
  extended by rl.client.Client
All Implemented Interfaces:
CommandProcessorListener

public class Client
extends java.lang.Object
implements CommandProcessorListener


Constructor Summary
Client()
           
 
Method Summary
 void addConnectionListener(ConnectionListener l)
           
 void addListener(ClientListener l)
           
 void askAvailableGames()
           
 void askAvailableGameTypes()
           
 void askServerStatus()
           
 void Connect(java.lang.String ServerName, int ServerPort)
           
 void disconnect()
           
 void disconnected(Connection c)
           
 Participant getParticipant()
           
 void joinGame(java.lang.String gameName, java.lang.String gameType)
           
static void main(java.lang.String[] args)
           
 void registerHandler(int command, CommandHandler ch)
           
 void removeConnectionListener(ConnectionListener l)
           
 void removeListener(ClientListener l)
           
 void setParticipant(Participant p)
           
 void startNewGame(java.lang.String GameType, java.lang.String GameName)
           
 java.lang.String toString()
           
 void updateServerStatus(Command c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Client

public Client()
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -

Connect

public void Connect(java.lang.String ServerName,
                    int ServerPort)
             throws java.lang.Exception
Throws:
java.lang.Exception

addConnectionListener

public void addConnectionListener(ConnectionListener l)
                           throws java.lang.Exception
Throws:
java.lang.Exception

removeConnectionListener

public void removeConnectionListener(ConnectionListener l)
                              throws java.lang.Exception
Throws:
java.lang.Exception

disconnect

public void disconnect()

setParticipant

public void setParticipant(Participant p)

getParticipant

public Participant getParticipant()

disconnected

public void disconnected(Connection c)
Specified by:
disconnected in interface CommandProcessorListener

addListener

public void addListener(ClientListener l)

removeListener

public void removeListener(ClientListener l)

startNewGame

public void startNewGame(java.lang.String GameType,
                         java.lang.String GameName)
                  throws java.lang.Exception
Throws:
java.lang.Exception

joinGame

public void joinGame(java.lang.String gameName,
                     java.lang.String gameType)
              throws java.lang.Exception
Throws:
java.lang.Exception

updateServerStatus

public void updateServerStatus(Command c)

askAvailableGameTypes

public void askAvailableGameTypes()

askAvailableGames

public void askAvailableGames()

askServerStatus

public void askServerStatus()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

registerHandler

public void registerHandler(int command,
                            CommandHandler ch)