de.kosi.model
Interface FoyerListener

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
AbstractClient, ProxyFoyerListener, FoyerAdapter

public interface FoyerListener
extends java.rmi.Remote

This listener will be registered at the Foyer which is the first class that a user gets when he connects to the KoSI-System. All KoSI-Clients must at least implement this listener to work reasonable.

ChangeLog:

 $Log: FoyerListener.java,v $
 Revision 1.2  2001/07/04 12:34:30  uid30828
 - Rubber score implemented
 - Inviting now working

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

 Revision 1.4  2001/03/05 20:55:21  login
 - Game (und zugehoerige Klassen) soweit fertig
 - package de.kosi.model.tournament angelegt
 - Pair angelegt
 - Round angelegt
 - Movement-Interface angelegt
 - KosiMovement fertig!!! :-)
 - KosiMovementTest um das KosiMovement zu testen
       (kann mit KOSI/kosimovementtest  aufgerufen werden)
 - Tournament und TournamentImpl in das package de.kosi.model.tournament
       verschoben
 - buildfile fuer die neuen klassen angepasst

 Revision 1.3  2001/02/09 21:41:13  login
 wrote docs for the FoyerListener


 

Version:
$Revision: 1.2 $ ($Date: 2001/07/04 12:34:30 $)
Author:
Timo, Niklas, Ole

Method Summary
 void disconnect()
          This method will be called if a user gets disconnected from the KoSI-System.
 void invite(Table table, User byUser, int direction)
          This method will be called if another user invites the user who registered this listener to take a seat at a specific table.
 void invite(Tournament tournament)
          This method will be called if another user invites the user who registered this listener to take part in a specific tournament.
 void notify(Game game)
          A call of this method notifies the user who registered this listener that he is currently playing the given game.
 void notify(Table table)
          A call of this method notifies the user who registered this listener that he is currently sitting at the given table.
 void notify(Tournament tournament)
          A call of this method notifies the user who registered this listener that he is currently taking part in the given tournament.
 void ping()
          This method is used for ping signals.
 

Method Detail

ping

public void ping()
          throws java.rmi.RemoteException
This method is used for ping signals. If the call of this method fails (throws an exception) the associated user's connection will be concerned as lost.
Throws:
java.rmi.RemoteException - If the remote call of this method fails.

disconnect

public void disconnect()
                throws java.rmi.RemoteException
This method will be called if a user gets disconnected from the KoSI-System.
Throws:
java.rmi.RemoteException - If the remote call of this method fails.

invite

public void invite(Table table,
                   User byUser,
                   int direction)
            throws java.rmi.RemoteException
This method will be called if another user invites the user who registered this listener to take a seat at a specific table. Only table owners may invite other users, so you get the inviter by the table's getOwner() method.
Parameters:
table - The table the user gets invited to.
byUser - User that invited us.
direction - Direction we should join the table in.
Throws:
java.rmi.RemoteException - If the RMI call of this method fails.

invite

public void invite(Tournament tournament)
            throws java.rmi.RemoteException
This method will be called if another user invites the user who registered this listener to take part in a specific tournament. (How do you get the inviter's nickname???)
Parameters:
tournament - The tournament the user gets invited to.
Throws:
java.rmi.RemoteException - If the RMI call of this method fails.

notify

public void notify(Game game)
            throws java.rmi.RemoteException
A call of this method notifies the user who registered this listener that he is currently playing the given game. This might be necessary if the user interimely lost his connection and its client got confused.
Parameters:
game - The game the user is currently playing.
Throws:
java.rmi.RemoteException - If the remote call fails.

notify

public void notify(Table table)
            throws java.rmi.RemoteException
A call of this method notifies the user who registered this listener that he is currently sitting at the given table. This might be necessary if the user interimely lost his connection and its client got confused.
Parameters:
table - The table the user is currently sitting at.
Throws:
java.rmi.RemoteException - If the remote call fails.

notify

public void notify(Tournament tournament)
            throws java.rmi.RemoteException
A call of this method notifies the user who registered this listener that he is currently taking part in the given tournament. This might be necessary if the user interimely lost his connection and its client got confused.
Parameters:
tournament - The tournament the user is currently taking part in.
Throws:
java.rmi.RemoteException - If the remote call fails.