org.jogre.comm
Class CommSimpleMessage

java.lang.Object
  |
  +--org.jogre.comm.CommSimpleMessage
All Implemented Interfaces:
ITransmittable
Direct Known Subclasses:
CommConnect, CommDisconnect, CommError, CommTableMessage

public abstract class CommSimpleMessage
extends Object
implements ITransmittable

This is a base message which all communication objects should extend. This includes a the username of the person who sent it and the status of the communication. The status codes should be defined in the sub class as a integer constant.

Version:
Alpha 0.1
Author:
Bob Marks

Field Summary
protected  int status
          Integer status of this comm message.
protected  String username
          Username of person who sent this message.
 
Constructor Summary
protected CommSimpleMessage()
          Empty constructor (used for reading a flat string)
protected CommSimpleMessage(String username, int status)
          Constructor which takes a username and a status.
 
Method Summary
 int getStatus()
          Return the status.
 String getUsername()
          Return the username.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jogre.comm.ITransmittable
flatten
 

Field Detail

username

protected String username
Username of person who sent this message.

status

protected int status
Integer status of this comm message.
Constructor Detail

CommSimpleMessage

protected CommSimpleMessage()
Empty constructor (used for reading a flat string)

CommSimpleMessage

protected CommSimpleMessage(String username,
                            int status)
Constructor which takes a username and a status.
Parameters:
username - A username.
status - A status
Method Detail

getUsername

public String getUsername()
Return the username.
Returns:
 

getStatus

public int getStatus()
Return the status.
Returns: