|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.kosi.model.FoyerImpl
This class contains the Default Implementation of the Foyer interface.
ChangeLog:
$Log: FoyerImpl.java,v $ Revision 1.13 2001/08/31 14:04:47 jiriki Fixed Bug 457164 Revision 1.12 2001/08/02 10:44:30 jiriki Worked on Tournament Revision 1.11 2001/08/02 09:33:53 jiriki Worked on tournament Revision 1.10 2001/07/31 13:00:27 jiriki Worked on Tournament Revision 1.9 2001/07/19 11:42:12 jiriki - Fixed Bug in TrickPane. - Started implementation of tournament. Revision 1.8 2001/07/16 12:19:32 jiriki Fixed Bug 441047. Revision 1.7 2001/07/02 17:37:18 jiriki - New Implementation of SSL Authorization - Implemented Client-Side Persistence Revision 1.6 2001/06/05 10:09:35 jiriki Implemented online-user list in foyer. Revision 1.5 2001/05/09 20:50:35 jiriki Removed Bugs 422366 and 422375. Revision 1.4 2001/05/09 18:55:21 jiriki Removed Bug 422612. Revision 1.3 2001/05/09 15:18:27 jiriki Removed Bug 422635. Revision 1.2 2001/05/09 10:02:44 betacarotine Removed Bug 421326. Revision 1.1.1.1 2001/04/29 18:05:17 jiriki Imported sources from zola. Revision 1.30 2001/04/27 12:49:35 login Added Locale in user creation, improved game stopwatch Revision 1.29 2001/04/17 19:30:08 wombat Updated Documentation Revision 1.28 2001/04/08 17:07:12 wombat Account Erstellung eingebaut Revision 1.27 2001/04/08 14:42:37 wombat Foyer chat entfernt. Revision 1.26 2001/04/05 14:11:52 login Worked on Tournament Revision 1.25 2001/03/21 13:26:36 wombat - Removed bugs in Table - began implementation of stree client - updated documentation Revision 1.24 2001/03/19 21:50:49 wombat - Worked on admin client. - improved shutdown sequence - removed bugs in login/logout sequence Revision 1.23 2001/03/18 18:10:26 wombat Updated Documentation Revision 1.22 2001/03/18 17:32:03 wombat Changed database concept Revision 1.21 2001/03/15 19:31:51 wombat Updated Documentation Revision 1.20 2001/03/14 13:46:34 wombat Worked on Admin Tool. Removed deadlock while killing session Revision 1.19 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/kosimovementtestaufgerufen werden) - Tournament und TournamentImpl in das package de.kosi.model.tournament verschoben - buildfile fuer die neuen klassen angepasst Revision 1.18 2001/03/01 20:31:32 wombat Worked on table implementation / updated documentation Revision 1.17 2001/03/01 14:43:00 wombat Worked on table implementation. Revision 1.16 2001/03/01 11:37:25 wombat worked on table implementation. Revision 1.15 2001/03/01 10:33:55 wombat Foyer modified to throw an Exception in the login() method, when calling the client foyer listener does not work. Revision 1.14 2001/02/25 23:16:05 wombat - deadlock vermeidung umgestellt. - ListenerList erstellt Revision 1.13 2001/02/07 16:54:04 wombat Updated Documentation
Constructor Summary | |
FoyerImpl()
Creates a new FoyerImpl. |
Method Summary | |
void |
close()
Close the Foyer. |
void |
createAccount(java.lang.String username,
java.lang.String email,
java.util.Locale locale,
int strength,
java.util.TimeZone timeZone,
java.lang.String biddingSystem)
Create a new user account. |
Table |
createTable(TableListener listener,
int direction,
boolean publicTable)
This method creates a new Table. |
Tournament |
createTournament(java.lang.String classname)
This method creates a new Tournament. |
AdminInterface |
getAdminInterface()
Returns a reference to the admiistrativ interface of the server. |
User |
getCurrentUser()
Returns the user currently logged in. |
int |
getMaxTables()
Get the maximum number of tables allowed to concurrently exist in the server. |
int |
getMaxTournaments()
Get the maximum number of tournaments allowed to concurrently exist in the server. |
int |
getMaxUsers()
Return the maximum number of users allowed to be concurrently logged into the server. |
DistributedList |
getOnlineUserList()
Returns the List of users currently logged in. |
DistributedList |
getTableList()
Returns the List of currently available Tables. |
DistributedList |
getTournamentList()
Returns the List of currently available Tournaments. |
User |
getUser(java.lang.String loginname)
Returns a reference to the user with the given name. |
xl2.odb.collections.XL2SortedMap |
getUserMap()
Returns the usermap. |
Session |
login(java.lang.String loginname,
java.lang.String password,
FoyerListener listener)
Log into the Foyer. |
void |
logout()
Log out of the Foyer. |
void |
setMaxTables(int maxTables)
Set the maximum number of tables allowed to concurrently exist in the server. |
void |
setMaxTournaments(int maxTournaments)
Set the maximum number of tournaments allowed to concurrently exist in the server. |
void |
setMaxUsers(int maxUsers)
Set the maximum number of users allowed to be concurrently logged into the server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FoyerImpl() throws java.rmi.RemoteException
java.rmi.RemoteException
- if the ChatChannel cannot be created.Method Detail |
public void close()
public xl2.odb.collections.XL2SortedMap getUserMap()
public Session login(java.lang.String loginname, java.lang.String password, FoyerListener listener) throws KosiAccessException, java.rmi.RemoteException
login
in interface Foyer
loginname
- Loginname of the account to open.password
- Password of the account.listener
- Listener informing the user of important events.KosiAccessException
- if a wrong password is provided, or the user does not exist.java.rmi.RemoteException
- if calling the FoyerListener does not work.public void logout() throws java.rmi.RemoteException, InvalidSessionException
logout
in interface Foyer
java.rmi.RemoteException
- if the remote call fails.InvalidSessionException
- if not called from within a valid session.public void createAccount(java.lang.String username, java.lang.String email, java.util.Locale locale, int strength, java.util.TimeZone timeZone, java.lang.String biddingSystem) throws java.rmi.RemoteException, java.lang.IllegalArgumentException
createAccount
in interface Foyer
username
- Username for the new account.email
- EMail address of the user.locale
- Locale for the user.strength
- Strength of the user (one of the User.STRENGHT_* constants).timeZone
- Time zone the user lives in.biddingSystem
- Bidding system. This is used to set up first conventions for the user.java.rmi.RemoteException
- If the temote call fails.java.lang.IllegalArgumentException
- If the username or the email address are not valid.public Tournament createTournament(java.lang.String classname) throws java.rmi.RemoteException, InvalidSessionException, TournamentException
createTournament
in interface Foyer
java.rmi.RemoteException
- if the remote call fails.InvalidSessionException
- if not called from within a valid session.TournamentException
- If an exception occurs, while creating the tournament.public Table createTable(TableListener listener, int direction, boolean publicTable) throws java.rmi.RemoteException, InvalidSessionException, TableException, UserAlreadyPlayingException
createTable
in interface Foyer
listener
- listener TableListener for the owner creating this table.direction
- direction the user want to play in (one of the Player constants).publicTable
- wether this Table is a public table.java.rmi.RemoteException
- if the remote call fails.TableException
- if an error occurs while creatingthe table.InvalidSessionException
- if not called from within a valid session.UserAlreadyPlayingException
- If the user calling this method is already playing.public DistributedList getTournamentList()
getTournamentList
in interface Foyer
public DistributedList getTableList()
getTableList
in interface Foyer
public DistributedList getOnlineUserList() throws InvalidSessionException
getOnlineUserList
in interface Foyer
InvalidSessionException
- if not called from within a valid session.public User getUser(java.lang.String loginname) throws InvalidSessionException
getUser
in interface Foyer
loginname
- Loginname of the user.InvalidSessionException
- if not called from within a valid session.public User getCurrentUser() throws InvalidSessionException
getCurrentUser
in interface Foyer
InvalidSessionException
- if not called from within a valid session.public AdminInterface getAdminInterface() throws java.rmi.RemoteException, KosiAccessException, InvalidSessionException
getAdminInterface
in interface Foyer
java.rmi.RemoteException
- If the remote call fails.KosiAccessException
- If called by an user, that is not an administrator.InvalidSessionException
- if not called from within a valid session.public int getMaxUsers()
public void setMaxUsers(int maxUsers)
maxUsers
- Maximum users. This value has to be >= 0.public int getMaxTables()
public void setMaxTables(int maxTables)
maxTables
- Maximum number of tables. This has to be >= 0.public int getMaxTournaments()
public void setMaxTournaments(int maxTournaments)
maxTournaments
- Maximum number of tournaments.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |