|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.kosi.model.tournament.TournamentImpl
This class implements the Tournament interface. See there for additional information.
ChangeLog:
$Log: TournamentImpl.java,v $ Revision 1.7 2001/08/02 10:44:30 jiriki Worked on Tournament Revision 1.6 2001/08/02 10:09:16 betacarotine Started implementing the preparetion of a tournament (form pairs etc.) Revision 1.5 2001/08/02 09:33:53 jiriki Worked on tournament Revision 1.4 2001/07/31 13:00:27 jiriki Worked on Tournament Revision 1.3 2001/07/31 12:55:27 betacarotine worked on the tournament Revision 1.2 2001/07/31 12:15:24 betacarotine worked on the tournament Revision 1.1.1.1 2001/04/29 18:05:18 jiriki Imported sources from zola. Revision 1.6 2001/04/25 12:05:40 login Worked on TournamentImpl Revision 1.5 2001/04/20 15:10:14 login updated docs Revision 1.4 2001/04/17 20:19:13 wombat Updated documentation. Revision 1.3 2001/04/09 13:03:10 wombat Removed timeout from threadpool (did not work) Revision 1.2 2001/04/05 14:11:52 login Worked on Tournament Revision 1.1 2001/03/05 20:55:22 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.3 2001/02/11 18:47:25 login updated docu
Field Summary | |
protected ListenerList |
listenerList
List of listeners to the tournament. |
Fields inherited from interface de.kosi.model.tournament.Tournament |
APPLICATION, EXECUTION, FINISHED, PREPARATION |
Constructor Summary | |
TournamentImpl()
Creates a new TournamentImpl that should be inserted into the given list and hass the given owner. |
Method Summary | |
void |
addTournamentListener(TournamentListener listener)
Adds a listener to this tournament. |
void |
appealToJudge(java.lang.String reason)
Appeal to a judge. |
abstract void |
calculateResults()
Calculate the Result of the tournament. |
protected void |
checkAccess()
Checks if the caller of the method is owner of this tournament. |
abstract Movement |
createMovement()
Creates the movement for this tournament. |
java.util.Calendar |
getApplicationDeadline()
Returns the applicationd eadline of this tournament. |
ChatChannel |
getChatChannel()
Returns the chat channel that belongs to this tournament. |
long |
getMatchTimeout()
Returns the timeout for matches. |
java.lang.String |
getOwnerName()
Returns the name of the owner of this tournament. |
java.util.Calendar |
getStartDate()
Returns the start date of this tournament. |
int |
getStatus()
Returns the status of this tournament. |
void |
init(DistributedListImpl tournamentList,
UserImpl owner)
|
boolean |
isOwner()
Return wether the User calling the method is the owner of this tournament. |
abstract void |
prepare()
|
void |
removeTournamentListener(TournamentListener listener)
Remove a listener from the tournament. |
void |
setApplicationDeadline(java.util.Calendar calendar)
Sets the applicationd eadline of this tournament. |
void |
setMatchTimeout(long timeout)
Set the timeout for matches. |
void |
setStartDate(java.util.Calendar calendar)
Sets the start date of this tournament. |
void |
setUserGame(UserImpl user,
GameImpl game)
Set the current Game of a user. |
void |
start()
Start the tournament. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.kosi.model.tournament.Tournament |
getConfiguration |
Field Detail |
protected transient ListenerList listenerList
Constructor Detail |
public TournamentImpl() throws java.rmi.RemoteException
tournamentList
- The list that contains all tournaments. It
is this tournament's own responsibility to insert itself into the
list.java.rmi.RemoteException
- If RMI runs into trouble.Method Detail |
public void init(DistributedListImpl tournamentList, UserImpl owner)
public void setUserGame(UserImpl user, GameImpl game)
user
- User whos game is set.game
- The current game of the user.public ChatChannel getChatChannel()
getChatChannel
in interface Tournament
public abstract Movement createMovement()
public java.util.Calendar getStartDate()
getStartDate
in interface Tournament
public void setStartDate(java.util.Calendar calendar) throws KosiAccessException, InvalidSessionException
setStartDate
in interface Tournament
calendar
- Calender containing the start date of this tournament.KosiAccessException
- If not called by the owner of this tournament.InvalidSessionException
- If not called from a valid session context.public java.util.Calendar getApplicationDeadline()
getApplicationDeadline
in interface Tournament
public void setApplicationDeadline(java.util.Calendar calendar) throws KosiAccessException, InvalidSessionException
setApplicationDeadline
in interface Tournament
calendar
- Calendar containing the application deadline.KosiAccessException
- If not called by the owner of this tournament.InvalidSessionException
- If not called from a valid session context.public long getMatchTimeout()
getMatchTimeout
in interface Tournament
public void setMatchTimeout(long timeout) throws KosiAccessException, InvalidSessionException
setMatchTimeout
in interface Tournament
timeout
- Timeout in milliseconds.KosiAccessException
- If not called by the owner of this tournament.InvalidSessionException
- If not called from a valid session context.protected void checkAccess() throws KosiAccessException, InvalidSessionException
KosiAccessException
- If not called by the owner of this tournament.InvalidSessionException
- If not called from a valid session context.public java.lang.String getOwnerName()
getOwnerName
in interface Tournament
public boolean isOwner() throws java.rmi.RemoteException, InvalidSessionException
isOwner
in interface Tournament
java.rmi.RemoteException
- If the remote call fails.InvalidSessionException
- If not called from a valid session context.public int getStatus()
getStatus
in interface Tournament
public void addTournamentListener(TournamentListener listener) throws InvalidSessionException
addTournamentListener
in interface Tournament
listener
- Listener to be informed about events in the tournament.InvalidSessionException
- If not called from a valid session context.public void removeTournamentListener(TournamentListener listener) throws InvalidSessionException
removeTournamentListener
in interface Tournament
listener
- Listener to be removed.InvalidSessionException
- If not called from a valid session context.public void start()
public abstract void calculateResults()
public abstract void prepare()
public void appealToJudge(java.lang.String reason)
reason
- Reason for calling a judge.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |