org.jogre.common.comm
Class CommNewTable

java.lang.Object
  extended byorg.jogre.common.comm.CommGameMessage
      extended byorg.jogre.common.comm.CommNewTable
All Implemented Interfaces:
ITransmittable, ITransmittableWithProps

public class CommNewTable
extends CommGameMessage
implements ITransmittableWithProps

Small communication object for requesting the creation of a new table. Although this message is responsible for table communication it is at the game level as we dont know our table number (the server creates).

Version:
Alpha 0.2.3
Author:
Bob Marks

Field Summary
 
Fields inherited from class org.jogre.common.comm.CommGameMessage
status, username, usernameTo, XML_ATT_STATUS, XML_ATT_USERNAME, XML_ATT_USERNAME_TO
 
Fields inherited from interface org.jogre.common.comm.ITransmittableWithProps
XML_ATT_PROPERTIES
 
Constructor Summary
CommNewTable(boolean isPublic)
          Constructor for creating a new table.
CommNewTable(XMLElement message)
          Consturctor for creating a new message.
 
Method Summary
 void addProperty(String key, String value)
          Add a property to the Table Action.
 XMLElement flatten()
          Flatten the String for transmission purposes.
 JogrePropertyHash getProperties()
          Return the properties hash.
 boolean isPublic()
          Return true if this table is a public table or not.
 
Methods inherited from class org.jogre.common.comm.CommGameMessage
flatten, 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

CommNewTable

public CommNewTable(boolean isPublic)
Constructor for creating a new table.


CommNewTable

public CommNewTable(XMLElement message)
Consturctor for creating a new message.

Parameters:
message -
Method Detail

isPublic

public boolean isPublic()
Return true if this table is a public table or not.

Returns:

addProperty

public void addProperty(String key,
                        String value)
Add a property to the Table Action.

Specified by:
addProperty in interface ITransmittableWithProps
Parameters:
key -
value -

getProperties

public JogrePropertyHash getProperties()
Description copied from interface: ITransmittableWithProps
Return the properties hash.

Specified by:
getProperties in interface ITransmittableWithProps
Returns:
See Also:
ITransmittableWithProps.getProperties()

flatten

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

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