|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoc.server.SOCGameList
A class for tracking the games
Field Summary | |
protected java.util.Hashtable |
gameData
|
protected java.util.Hashtable |
gameMembers
|
protected java.util.Hashtable |
gameMutexes
|
protected boolean |
inUse
|
Constructor Summary | |
SOCGameList()
constructor |
Method Summary | |
void |
addMember(Connection conn,
java.lang.String gaName)
add a member to the game |
void |
createGame(java.lang.String gaName)
create a new game |
void |
deleteGame(java.lang.String gaName)
remove the game from the list |
SOCGame |
getGameData(java.lang.String gaName)
|
java.util.Enumeration |
getGames()
|
java.util.Vector |
getMembers(java.lang.String gaName)
|
boolean |
isGame(java.lang.String gaName)
|
boolean |
isGameEmpty(java.lang.String gaName)
|
boolean |
isMember(Connection conn,
java.lang.String gaName)
|
void |
releaseMonitor()
release the monitor for this game list |
boolean |
releaseMonitorForGame(java.lang.String game)
release the monitor for this game |
void |
removeMember(Connection conn,
java.lang.String gaName)
remove member from the game |
void |
takeMonitor()
take the monitor for this game list |
boolean |
takeMonitorForGame(java.lang.String game)
take the monitor for this game |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Hashtable gameMutexes
protected java.util.Hashtable gameMembers
protected java.util.Hashtable gameData
protected boolean inUse
Constructor Detail |
public SOCGameList()
Method Detail |
public void takeMonitor()
public void releaseMonitor()
public boolean takeMonitorForGame(java.lang.String game)
game
- the name of the game
public boolean releaseMonitorForGame(java.lang.String game)
game
- the name of the game
public java.util.Enumeration getGames()
public boolean isGameEmpty(java.lang.String gaName)
gaName
- the name of the game
public java.util.Vector getMembers(java.lang.String gaName)
gaName
- game name
public SOCGame getGameData(java.lang.String gaName)
gaName
- game name
public boolean isMember(Connection conn, java.lang.String gaName)
gaName
- the name of the gameconn
- the member's connection
public void addMember(Connection conn, java.lang.String gaName)
gaName
- the name of the gameconn
- the member's connectionpublic void removeMember(Connection conn, java.lang.String gaName)
gaName
- the name of the gameconn
- the member's connectionpublic boolean isGame(java.lang.String gaName)
gaName
- the name of the game
public void createGame(java.lang.String gaName)
gaName
- the name of the gamepublic void deleteGame(java.lang.String gaName)
gaName
- the name of the game
|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |