de.kosi.model
Class FoyerAdapter

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

public class FoyerAdapter
extends java.lang.Object
implements FoyerListener

Adapter for the FoyerListener.

ChangeLog:

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

 Revision 1.2  2001/06/14 14:41:01  jiriki
 Code maintanance
 (Updated docs, removed unused code, improved code style)

 Revision 1.1  2001/06/12 17:14:33  jiriki
 - Reimplemented DistributedList to make filters working
 - Made ServertestCase working.

 

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

Constructor Summary
FoyerAdapter()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FoyerAdapter

public FoyerAdapter()
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.
Specified by:
ping in interface FoyerListener
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.
Specified by:
disconnect in interface FoyerListener
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.
Specified by:
invite in interface FoyerListener
Parameters:
table - The table the user gets invited to.
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???)
Specified by:
invite in interface FoyerListener
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.
Specified by:
notify in interface FoyerListener
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.
Specified by:
notify in interface FoyerListener
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.
Specified by:
notify in interface FoyerListener
Parameters:
tournament - The tournament the user is currently taking part in.
Throws:
java.rmi.RemoteException - If the remote call fails.