org.jogre.comm
Class CommInvite

java.lang.Object
  |
  +--org.jogre.comm.CommSimpleMessage
        |
        +--org.jogre.comm.CommTableMessage
              |
              +--org.jogre.comm.CommInvite
All Implemented Interfaces:
ITransmittable
Direct Known Subclasses:
CommOfferDraw

public class CommInvite
extends CommTableMessage

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

Version:
Alpha 0.1
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  String usernameTo
          Additional field to show which user is being invited.
 
Fields inherited from class org.jogre.comm.CommTableMessage
isPublic, NO_TABLE, tableNum
 
Fields inherited from class org.jogre.comm.CommSimpleMessage
status, username
 
Constructor Summary
protected CommInvite()
          Empty constructor.
  CommInvite(String inString)
          Constructor which creates a CommInvite object from the flatten () method of another CommInvite object.
  CommInvite(String username, int status, int tableNum, boolean isPublic, String usernameTo)
          Constructor for a CommInvite object which is used to invite a user to a particular table.
 
Method Summary
 String flatten()
          Flatten this offer draw object.
 String getUsernameTo()
          Return the username to.
 
Methods inherited from class org.jogre.comm.CommTableMessage
getTableNum, isPublic
 
Methods inherited from class org.jogre.comm.CommSimpleMessage
getStatus, getUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST

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

ACCEPT

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

DECLINE

public static final int DECLINE
User declines invite from.

usernameTo

protected String usernameTo
Additional field to show which user is being invited.
Constructor Detail

CommInvite

protected CommInvite()
Empty constructor.

CommInvite

public CommInvite(String username,
                  int status,
                  int tableNum,
                  boolean isPublic,
                  String usernameTo)
Constructor for a CommInvite object which is used to invite a user to a particular table.
Parameters:
username - User who send the CommInvite object.
status - Status of the message i.e. request, accept & decline.
tableNum - Table number of the message.
isPublic - Boolean to specifie if the table is public or not.
usernameTo - The user that is being invited.

CommInvite

public CommInvite(String inString)
           throws TransmissionException
Constructor which creates a CommInvite object from the flatten () method of another CommInvite object.
Parameters:
inString -  
Throws:
TransmissionException -  
Method Detail

flatten

public String flatten()
Flatten this offer draw object.
See Also:
ITransmittable.flatten()

getUsernameTo

public String getUsernameTo()
Return the username to. This is the username of the user of where the message is being sent to.
Returns: