org.jogre.common.comm
Class CommChatGame

java.lang.Object
  extended byorg.jogre.common.comm.CommGameMessage
      extended byorg.jogre.common.comm.CommChatGame
All Implemented Interfaces:
ITransmittable
Direct Known Subclasses:
CommChatPrivate

public class CommChatGame
extends CommGameMessage

Communication class which is used to broadcast a chat message to all users at a particular game.

Version:
Alpha 0.2.3
Author:
Bob Marks

Field Summary
protected  String chat
          Chat String.
 
Fields inherited from class org.jogre.common.comm.CommGameMessage
status, username, usernameTo, XML_ATT_STATUS, XML_ATT_USERNAME, XML_ATT_USERNAME_TO
 
Constructor Summary
CommChatGame(String chat)
          Constructer for a broadcast message which is sent to everyone.
CommChatGame(XMLElement message)
          Constructor which creates a CommChatBroadcast object from the flatten () method of another CommChatBroadcast object.
 
Method Summary
 XMLElement flatten()
          Transmittable String representation of this object.
 String getChat()
          Return the content of the message.
 
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
 

Field Detail

chat

protected String chat
Chat String.

Constructor Detail

CommChatGame

public CommChatGame(String chat)
Constructer for a broadcast message which is sent to everyone.

Parameters:
chat - Chat message from user.

CommChatGame

public CommChatGame(XMLElement message)
             throws TransmissionException
Constructor which creates a CommChatBroadcast object from the flatten () method of another CommChatBroadcast object.

Parameters:
message - XML element version of object.
Throws:
TransmissionException - Thrown if problem in transmission
Method Detail

flatten

public XMLElement flatten()
Transmittable String representation of this object.

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

getChat

public String getChat()
Return the content of the message.

Returns:
Chat message.