org.jogre.common.comm
Class CommInvite

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

public class CommInvite
extends CommGameMessage

Communication class which is used to invite a user to a table.

Version:
Alpha 0.2.3
Author:
Bob Marks

Field Summary
static int ACCEPT
          User accepts invite from a user.
static int DECLINE
          User declines invite from.
static int REQUEST
          User requests invite to a user.
protected  int tableNum
          Table number.
 
Fields inherited from class org.jogre.common.comm.CommGameMessage
status, username, usernameTo, XML_ATT_STATUS, XML_ATT_USERNAME, XML_ATT_USERNAME_TO
 
Constructor Summary
CommInvite(int status, int tableNum)
          Constructor which takes a status and table number.
CommInvite(int status, int tableNum, String usernameTo)
          Constructor for a CommInvite object which is used to invite a user to a particular table.
CommInvite(XMLElement message)
          Constructor which creates a CommInvite object from the flatten () method of another CommInvite object.
 
Method Summary
 XMLElement flatten()
          Flatten this offer draw object.
 int getTableNum()
          Return the table number.
 
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

REQUEST

public static final int REQUEST
User requests invite to a user.

See Also:
Constant Field Values

ACCEPT

public static final int ACCEPT
User accepts invite from a user.

See Also:
Constant Field Values

DECLINE

public static final int DECLINE
User declines invite from.

See Also:
Constant Field Values

tableNum

protected int tableNum
Table number.

Constructor Detail

CommInvite

public CommInvite(int status,
                  int tableNum)
Constructor which takes a status and table number.

Parameters:
status - Status of the message i.e. request, accept & decline.
tableNum - Table number.

CommInvite

public CommInvite(int status,
                  int tableNum,
                  String usernameTo)
Constructor for a CommInvite object which is used to invite a user to a particular table.

Parameters:
status - Status of the message i.e. request, accept & decline.
tableNum - Table number.
usernameTo - The user that is being invited.

CommInvite

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

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

flatten

public XMLElement flatten()
Flatten this offer draw object.

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

getTableNum

public int getTableNum()
Return the table number.

Returns:
Table number.