de.kosi.admin
Class AdminClient

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

public class AdminClient
extends AbstractClient

The administration client is used to configure the server. Classes that want to be configurable, have to register a implementation of the Configurable Interface with the AdminInterfaceImpl.

ChangeLog:

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

 Revision 1.5  2001/06/25 14:49:13  jiriki
 - Added better Exception handling to the client
 - Removed unused source

 Revision 1.4  2001/05/22 16:05:24  jiriki
 Made files more compliant to Coding Conventions.

 Revision 1.3  2001/05/09 15:10:55  jiriki
 Removed Bugs while displaying ExceptionMessages in admin client.

 Revision 1.2  2001/04/30 19:08:34  jiriki
 Improved Exception handling of AdminClient

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

 Revision 1.8  2001/04/29 16:50:44  wombat
 Added ExceptionHandlers

 Revision 1.7  2001/04/27 14:06:24  login
 Implemented localized exception

 Revision 1.6  2001/04/22 20:26:18  wombat
 - I18N Admin Client.
 - Made Admin Client a little bit more compliant 
   to the Java Look And Feel Design Guidelines.

 Revision 1.5  2001/04/11 12:34:32  wombat
 jar files restructured.

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

 Revision 1.3  2001/03/19 21:50:49  wombat
 - Worked on admin client.
 - improved shutdown sequence
 - removed bugs in login/logout sequence

 Revision 1.2  2001/03/14 18:40:44  wombat
 Updated Documentation, removed bugs in Gui factory

 

Version:
$Revision: 1.6 $ ($Date: 2001/07/04 12:34:29 $)
Author:
Niklas Mehner

Field Summary
static int STATUS_EXIT
          Status indicating that the Client should exit.
static int STATUS_LOGIN_INTERACTIVE
          Status indicating that the LoginScreen should be displayed.
static int STATUS_MAIN_FRAME
          Status indicating that the MainFrame should be displayed.
static int STATUS_RECONNECT
          Status indicating that the client should login without showing the login screen.
 
Constructor Summary
AdminClient()
          Creates a new AdminClient.
 
Method Summary
 void abortConnection(java.lang.String messageName)
          Display a message and reconnect or exit.
 void disconnect()
          Disconnect from the server.
 int getStatus()
          Get the status of the AdminClient.
 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)
          Start the administartion client.
 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 run()
          Start the client.
 void setStatus(int status)
          Set the status of the AdminClient.
 
Methods inherited from class de.kosi.AbstractClient
connect, disconnectFromServer, getFoyer, login, logout, ping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_LOGIN_INTERACTIVE

public static final int STATUS_LOGIN_INTERACTIVE
Status indicating that the LoginScreen should be displayed.

STATUS_RECONNECT

public static final int STATUS_RECONNECT
Status indicating that the client should login without showing the login screen.

STATUS_MAIN_FRAME

public static final int STATUS_MAIN_FRAME
Status indicating that the MainFrame should be displayed.

STATUS_EXIT

public static final int STATUS_EXIT
Status indicating that the Client should exit.
Constructor Detail

AdminClient

public AdminClient()
Creates a new AdminClient.
Method Detail

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.

disconnect

public void disconnect()
Disconnect from the server.
Overrides:
disconnect in class AbstractClient
Following copied from interface: de.kosi.model.FoyerListener
Throws:
java.rmi.RemoteException - If the remote call of this method fails.

run

public void run()
Start the client.

setStatus

public void setStatus(int status)
Set the status of the AdminClient.
Parameters:
status - One of the STATUS_* constants.

getStatus

public int getStatus()
Get the status of the AdminClient.
Returns:
One of the STATUS_* constants.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Start the administartion client.
Parameters:
args - Can be empty or contain a client configuration name.
Throws:
java.lang.Exception - If a Exception occurs while starting the client.

abortConnection

public void abortConnection(java.lang.String messageName)
Display a message and reconnect or exit.
Parameters:
messageName - Name of the message displayed.