|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jogre.common.comm.CommGameMessage
org.jogre.common.comm.CommTableMessage
Abstract base class for table messages. This class is used for creating communication objects between games e.g. CommExecuteChessMove. Fields which are most commonly used include username, status and table number.
Field Summary | |
static int |
NO_TABLE
No table being used in the message. |
protected int |
tableNum
Table number. |
static String |
XML_ATT_TABLE_NUM
XML attribute for table number. |
Fields inherited from class org.jogre.common.comm.CommGameMessage |
status, username, usernameTo, XML_ATT_STATUS, XML_ATT_USERNAME, XML_ATT_USERNAME_TO |
Constructor Summary | |
protected |
CommTableMessage()
Creates a communcation table object with no status. |
protected |
CommTableMessage(int status)
Creates a table message with a status. |
protected |
CommTableMessage(int status,
String username)
Create a table message to go to a particular user. |
protected |
CommTableMessage(String username)
Creates a table message with a username. |
protected |
CommTableMessage(XMLElement message)
Constructor which parses the XMLElement into class fields. |
Method Summary | |
XMLElement |
flatten(String name)
Create an abstract XMLElement which sub classes can use. |
int |
getTableNum()
Return the table number for this table. |
void |
setTableNum(int tableNum)
Set the table number - this is done in the API. |
Methods inherited from class org.jogre.common.comm.CommGameMessage |
getStatus, getUsername, getUsernameTo, isUsernameSet, isUsernameToSet, setUsername, setUsernameTo, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jogre.common.comm.ITransmittable |
flatten |
Field Detail |
public static final int NO_TABLE
protected int tableNum
public static final String XML_ATT_TABLE_NUM
Constructor Detail |
protected CommTableMessage()
protected CommTableMessage(int status)
status
- Integer status codeprotected CommTableMessage(String username)
protected CommTableMessage(int status, String username)
status
- Integer status codeusername
- Usernameprotected CommTableMessage(XMLElement message)
message
- Element to parse.Method Detail |
public void setTableNum(int tableNum)
tableNum
- Set the table number.public int getTableNum()
public XMLElement flatten(String name)
flatten
in class CommGameMessage
name
- Name of the commuication object.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |