de.kosi
Class StressClient

java.lang.Object
  |
  +--de.kosi.AbstractClient
        |
        +--de.kosi.StressClient
All Implemented Interfaces:
FoyerListener, java.rmi.Remote

public class StressClient
extends AbstractClient

The most annoying client in the world. It just connects to the server, plays at the first available Table (or if not possible : Creates its own. Bids random bids and plays random cards.

ChangeLog:

 $Log: StressClient.java,v $
 Revision 1.5  2001/07/04 12:34:29  uid30828
 - Rubber score implemented
 - Inviting now working

 Revision 1.4  2001/06/22 13:24:32  jiriki
 Implemented kicking

 Revision 1.3  2001/06/04 14:21:09  jiriki
 Made source more comliant to coding guidelines.

 Revision 1.2  2001/05/22 10:16:02  jiriki
 - Removed old unused Client class
 - Removed unused import statements.

 Revision 1.1.1.1  2001/04/29 18:05:15  jiriki
 Imported sources from zola.

 Revision 1.10  2001/04/17 16:49:43  wombat
 Restructured build file.

 Revision 1.9  2001/04/09 13:03:10  wombat
 Removed timeout from threadpool (did not work)

 Revision 1.8  2001/04/08 17:07:12  wombat
 Account Erstellung eingebaut

 Revision 1.7  2001/04/08 14:30:44  wombat
 Anfang Implementierung der selbst-alertierung

 Revision 1.6  2001/03/29 21:01:04  wombat
 - Improved logging.
 - Removed bugs from StressClient

 Revision 1.5  2001/03/27 10:38:53  wombat
 Added getOpener method and modified StressClient to user it.
 There is a problem with the StressClient, when the listeners are
 not registered before events are sent. The GameImpl should the last
 event to the listener, after it registered.

 Revision 1.4  2001/03/23 10:48:52  wombat
 - Table now restarts game
 - began GuestUser implementation

 Revision 1.3  2001/03/22 16:40:46  wombat
 - Updated ant to 1.3
 - Removed bugs in GameImpl and StressClient

 Revision 1.2  2001/03/21 22:34:40  wombat
 Worked on StressClient, removed bugs in GameImpl/Bidding, improved logging

 Revision 1.1  2001/03/21 13:26:36  wombat
 - Removed bugs in Table
 - began implementation of stree client
 - updated documentation

 

Version:
$Revision: 1.5 $ ($Date: 2001/07/04 12:34:29 $)
Author:
Jan-Ole Janssen, Niklas Mehner, Time Sticher

Constructor Summary
StressClient(java.lang.String hostname, java.lang.String username, java.lang.String password)
          Creates a new StressClient.
 
Method Summary
 void bid()
          Bid a random bid.
 void invite(Table table, User byUser, int direction)
          Called when this client is invited to a table (empty implementation).
 void invite(Tournament tournament)
          Called when this client is invited to a tournament (empty implementation).
static void main(java.lang.String[] args)
          Main method
 void notify(Game game)
          Notifies the client of a game it is taking part in (empty implementation).
 void notify(Table table)
          Notifies the client of a Table it is taking part in (empty implementation).
 void notify(Tournament tournament)
          Notifies the client of a tournament it is taking part in (empty implementation).
 void playCard(boolean playDummy)
          Play a Random Card.
 void run()
          Start the stress client.
 
Methods inherited from class de.kosi.AbstractClient
connect, disconnect, disconnectFromServer, getFoyer, login, logout, ping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StressClient

public StressClient(java.lang.String hostname,
                    java.lang.String username,
                    java.lang.String password)
Creates a new StressClient.
Parameters:
username - Username to connect.
password - Password to use.
hostname - Host to connect to.
Method Detail

bid

public void bid()
Bid a random bid.

playCard

public void playCard(boolean playDummy)
Play a Random Card.
Parameters:
playDummy - True if a dummy card should be played.

invite

public void invite(Table table,
                   User byUser,
                   int direction)
Called when this client is invited to a table (empty implementation).
Parameters:
table - tale the client is invited to.

invite

public void invite(Tournament tournament)
Called when this client is invited to a tournament (empty implementation).
Parameters:
tournament - Tournament the client is invited to.

notify

public void notify(Game game)
Notifies the client of a game it is taking part in (empty implementation).
Parameters:
game - Game the client is taking part in.

notify

public void notify(Table table)
Notifies the client of a Table it is taking part in (empty implementation).
Parameters:
table - Table the client is taking part in.

notify

public void notify(Tournament tournament)
Notifies the client of a tournament it is taking part in (empty implementation).
Parameters:
tournament - Tournament the client is taking part in.

run

public void run()
         throws java.lang.Exception
Start the stress client.
Throws:
java.lang.Exception - If the execution fails.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method
Parameters:
args - The stress client expects the hostname, username and password in the commandline.
Throws:
java.lang.Exception - If the execution fails.