|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jogre.common.comm.CommBaseMessage
org.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 boolean |
omitSender
Boolean which specify to the server when broadcasting this message to a table to omit the original sender. |
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 |
gameID, LAYER, usernameTo, XML_ATT_GAME_ID |
Fields inherited from class org.jogre.common.comm.CommBaseMessage |
layer, status, username, XML_ATT_LAYER |
Constructor Summary | |
protected |
CommTableMessage()
Create a communcation table object with no status. |
protected |
CommTableMessage(boolean omitSender)
Table communication object which when sent from server will omit the sender. |
protected |
CommTableMessage(int status)
Create a table message with a status. |
protected |
CommTableMessage(int status,
boolean omitSender)
Create a communcation table object with a status which will be broadcast to a table except to the person sending it. |
protected |
CommTableMessage(int status,
String usernameTo)
Create a table message to go to a particular user. |
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. |
boolean |
isOmittingSender()
Return true if the sender is omitted or not. |
void |
setTableNum(int tableNum)
Set the table number - this is done in the API. |
Methods inherited from class org.jogre.common.comm.CommGameMessage |
getGameID, getUsernameTo, isUsernameToSet, setGameID |
Methods inherited from class org.jogre.common.comm.CommBaseMessage |
getStatus, getUsername, setUsername |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jogre.common.comm.ITransmittable |
flatten |
Field Detail |
public static final int NO_TABLE
protected int tableNum
protected boolean omitSender
public static final String XML_ATT_TABLE_NUM
Constructor Detail |
protected CommTableMessage()
protected CommTableMessage(boolean omitSender)
omitSender
- True if omitting the person who sent it.protected CommTableMessage(int status)
status
- protected CommTableMessage(int status, boolean omitSender)
status
- omitSender
- protected CommTableMessage(int status, String usernameTo)
status
- usernameTo
- protected CommTableMessage(XMLElement message)
message
- Element to parse.Method Detail |
public void setTableNum(int tableNum)
tableNum
- Set the table number.public int getTableNum()
public boolean isOmittingSender()
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 |