|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.asdf.common.Game
public abstract class Game
Game interface. Game plugin developers implement abstract methods such as handleRequest and handleResponse to receive messages from clients. Plugins can send data using provided send methods.
Field Summary | |
---|---|
int |
age
Tells us how many times this game has been checked for removal. |
Constructor Summary | |
---|---|
Game()
|
Method Summary | |
---|---|
java.lang.String[] |
columnNamesSync()
Requests the game to return a list of columns this type of game wants to list in the game browser. |
GameListResponse.Games.Game |
descriptionSync()
Requests the game to return a description of itself. |
void |
detailsSync(GameDetailsResponse a)
Requests the game to return a description of itself. |
abstract void |
die()
Offers the game a chance to notify all players and observers about the imminent destruction of this game. |
void |
dieSync()
Offers the game a chance to notify all players and observers about the imminent destruction of this game. |
java.lang.String |
getAccountName(long sessionID)
Get account name of the user. |
long |
getId()
Getter for the game ID |
java.lang.String |
getName()
Getter for the game's name. |
AccountType |
getUserType(long sessionID)
Get type of the user. |
void |
handleRequestSync(long sessionID,
GameRequest request)
Handle incoming GameRequest. |
void |
handleResponseSync(long sessionID,
GameResponse response)
Handle incoming GameResponse. |
void |
initialize(Server server,
long gameID,
java.lang.String name)
Only constructor. |
java.lang.String |
toString()
toString method to ease debugging. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int age
Constructor Detail |
---|
public Game()
Method Detail |
---|
public final void handleRequestSync(long sessionID, GameRequest request)
sessionID
- Identifies session on which the message was receivedrequest
- GameRequestpublic final GameListResponse.Games.Game descriptionSync()
public final void detailsSync(GameDetailsResponse a)
public final java.lang.String[] columnNamesSync()
public final void handleResponseSync(long sessionID, GameResponse response)
sessionID
- Identifies session on which the message was receivedresponse
- GameResponsepublic final void initialize(Server server, long gameID, java.lang.String name)
server
- gameID
- name
- public final long getId()
public final java.lang.String getName()
public AccountType getUserType(long sessionID)
sessionID
-
public java.lang.String getAccountName(long sessionID)
sessionID
-
public final void dieSync()
public abstract void die()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |