feud.testgame
Interface GameClient

All Known Implementing Classes:
BlueThunderClient

public interface GameClient

Interface that defines a game client.


Method Summary
 void connect(ServerEntry server, java.lang.String name)
          Connect the client to a server
 void disconnect()
          Disconnect from the current server
 ServerEntry getServer()
          Returns the server represented by a server entry.
 boolean isConnected()
          Checks if the client is connected to a server.
 void quit()
          Shuts down the client and everything...
 boolean runsServer()
          Returns true, is a local server is running on this client machine.
 void shutDownServer()
          Shuts down a local server on the client machine if one is running.
 void startServer(int port)
          Starts a local server on the client machine.
 

Method Detail

connect

public void connect(ServerEntry server,
                    java.lang.String name)
             throws java.lang.Exception
Connect the client to a server

Parameters:
server - ServerEntry the server entry of the server to connect to
name - String the name of this client
Throws:
java.lang.Exception

disconnect

public void disconnect()
                throws java.lang.Exception
Disconnect from the current server

Throws:
java.lang.Exception

isConnected

public boolean isConnected()
Checks if the client is connected to a server.

Returns:
boolean is it connected or not?

getServer

public ServerEntry getServer()
Returns the server represented by a server entry.

Returns:
ServerEntry the server

startServer

public void startServer(int port)
                 throws java.lang.Exception
Starts a local server on the client machine.

Parameters:
port - int the port on which the server should listen
Throws:
java.lang.Exception

shutDownServer

public void shutDownServer()
                    throws java.lang.Exception
Shuts down a local server on the client machine if one is running.

Throws:
java.lang.Exception

runsServer

public boolean runsServer()
Returns true, is a local server is running on this client machine.

Returns:
boolean is it?

quit

public void quit()
Shuts down the client and everything...