org.jogre.common.comm
Class CommJoinTable

java.lang.Object
  extended byorg.jogre.common.comm.CommGameMessage
      extended byorg.jogre.common.comm.CommTableMessage
          extended byorg.jogre.common.comm.CommJoinTable
All Implemented Interfaces:
ITransmittable

public class CommJoinTable
extends CommTableMessage

Small communication object for joining an existing table.

Version:
Alpha 0.2.3
Author:
Bob Marks

Field Summary
 
Fields inherited from class org.jogre.common.comm.CommTableMessage
NO_TABLE, tableNum, XML_ATT_TABLE_NUM
 
Fields inherited from class org.jogre.common.comm.CommGameMessage
status, username, usernameTo, XML_ATT_STATUS, XML_ATT_USERNAME, XML_ATT_USERNAME_TO
 
Constructor Summary
CommJoinTable(int tableNum)
          Constructor for client requesting joining an existing table.
CommJoinTable(String username, int tableNum)
          Constructor for a server responding to other clients.
CommJoinTable(String username, Table table)
          Constructor from the server to the joining client.
CommJoinTable(XMLElement message)
          Constructor which takes an XMLElement.
 
Method Summary
 boolean containsModel()
          Return true if this message contains a model.
 XMLElement flatten()
          Flatten the String for transmission purposes.
 XMLElement getModelState()
          Return the model state.
 PlayerList getPlayerList()
          Return the player list.
 
Methods inherited from class org.jogre.common.comm.CommTableMessage
flatten, getTableNum, setTableNum
 
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
 

Constructor Detail

CommJoinTable

public CommJoinTable(int tableNum)
Constructor for client requesting joining an existing table.


CommJoinTable

public CommJoinTable(String username,
                     Table table)
Constructor from the server to the joining client.

Parameters:
username - Name of username who has just joined.
table - Table object that the user is joining.

CommJoinTable

public CommJoinTable(String username,
                     int tableNum)
Constructor for a server responding to other clients.

Parameters:
username - Name of username who has just joined.
tableNum - Table number of table user is joining.

CommJoinTable

public CommJoinTable(XMLElement message)
Constructor which takes an XMLElement.

Parameters:
message -
Method Detail

getPlayerList

public PlayerList getPlayerList()
Return the player list.

Returns:
Player list.

getModelState

public XMLElement getModelState()
Return the model state.

Returns:

containsModel

public boolean containsModel()
Return true if this message contains a model.

Returns:

flatten

public XMLElement flatten()
Flatten the String for transmission purposes.

Returns:
XML version of the state of an object which can be constructed again.
See Also:
ITransmittable.flatten()