public class SimpleGameAdminService extends Object implements GameAdminService
| Modifier and Type | Field and Description |
|---|---|
private Collection<Game> |
games |
| Constructor and Description |
|---|
SimpleGameAdminService() |
| Modifier and Type | Method and Description |
|---|---|
Collection<Game> |
getGames() |
Object |
loadGame(long gameId,
String gameName)
Loads a game based on the game id OR game name.
|
Object |
loadGameRoom(Game game,
long gameRoomId,
String gameRoomName)
Loads a game room based on the game room id OR game name.
|
boolean |
registerGame(Game game)
Implementation method will internally add this game instance to a set.
|
void |
setGames(Collection<Game> games) |
void |
shutdown()
Unloads all the games and game rooms that is stored in the admin services
internal set.
|
Object |
unLoadGame(Game game)
Unloads a game based on the game instance passed in.
|
Object |
unLoadGame(long gameId,
String gameName)
Unloads a game based on the game id OR game name.
|
Object |
unloadGameRoom(Game game,
long gameRoomId)
Unloads a game room of a game based on the instance of the game, the
unique identifier of the game room or the string game room name.
|
void |
unloadGameRoom(GameRoom gameRoom)
Unloads a game room based on the game room instance passed in.
|
Object |
unloadGameRoom(Game game,
String gameRoomId)
Unloads a game room of a game based on the instance of the game and the
name of the game room.
|
private Collection<Game> games
public boolean registerGame(Game game)
GameAdminServiceregisterGame in interface GameAdminServicegame - The game instance to register with the admin service.public Object loadGame(long gameId, String gameName)
GameAdminServiceloadGame in interface GameAdminServicegameId - The unique number identifier for the game. Most probably a
database key.gameName - The unique name for a game.public Object loadGameRoom(Game game, long gameRoomId, String gameRoomName)
GameAdminServiceloadGameRoom in interface GameAdminServicegame - The game for which the game room need to be loaded.gameRoomId - The unique identifier for the game room. Most probably a
database id.gameRoomName - The name of the game room to load.public Object unLoadGame(long gameId, String gameName)
GameAdminServiceGameRooms or PlayerSessions associated
with this game.unLoadGame in interface GameAdminServicegameId - The unique number identifier for the game. Most probably a
database key.gameName - The unique name for a game.public Object unLoadGame(Game game)
GameAdminServiceGameRooms or
PlayerSessions associated with this game.unLoadGame in interface GameAdminServicegame - The instance of the game to unload.public void unloadGameRoom(GameRoom gameRoom)
GameAdminServicePlayerSessions associated with this game room.unloadGameRoom in interface GameAdminServicegameRoom - The game room instance which is to be unloaded.public Object unloadGameRoom(Game game, long gameRoomId)
GameAdminServicePlayerSessions associated with this game room.unloadGameRoom in interface GameAdminServicegame - The instance of the game for which the game room needs to be
removed.gameRoomId - The unique identifier for the game room. Most probably a
database id.public Object unloadGameRoom(Game game, String gameRoomId)
GameAdminServicePlayerSessions associated with this game room.unloadGameRoom in interface GameAdminServicegame - The instance of the game for which the game room needs to be
removedgameRoomId - The name of the game room to unload.public void shutdown()
GameAdminServiceshutdown in interface GameAdminServicepublic Collection<Game> getGames()
public void setGames(Collection<Game> games)
Copyright © 2013. All Rights Reserved.