org.jogre.common.comm
Class CommGameConnect

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

public class CommGameConnect
extends CommGameMessage

Communciations connect object.

Version:
Alpha 0.2.1
Author:
Bob Marks

Field Summary
static int CLIENT_REQUEST_CONNECT
          Status code for a client requesting a connection.
protected  String password
          Password if connecting to the JOGRE master server.
static int SERVER_FULL
          Status code for a server receiving a connection.
static int SERVER_RECEIVED_CONNECT
          Status code for a server receiving a connection.
 
Fields inherited from class org.jogre.common.comm.CommGameMessage
gameID, LAYER, usernameTo, XML_ATT_GAME_ID
 
Fields inherited from class org.jogre.common.comm.CommBaseMessage
layer, status, username, XML_ATT_LAYER
 
Constructor Summary
CommGameConnect(int status)
          Constructor which takes a status integer.
CommGameConnect(XMLElement message)
          Constructor which creates a CommConnect object from the flatten () method of another CommConnect object.
 
Method Summary
 XMLElement flatten()
          Flatten the connect object into a XML communication object.
 String getPassword()
          Return the password.
 void setPassword(String password)
          Set the password.
 
Methods inherited from class org.jogre.common.comm.CommGameMessage
flatten, getGameID, getUsernameTo, isUsernameToSet, setGameID
 
Methods inherited from class org.jogre.common.comm.CommBaseMessage
getStatus, getUsername, setUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLIENT_REQUEST_CONNECT

public static final int CLIENT_REQUEST_CONNECT
Status code for a client requesting a connection.

See Also:
Constant Field Values

SERVER_RECEIVED_CONNECT

public static final int SERVER_RECEIVED_CONNECT
Status code for a server receiving a connection.

See Also:
Constant Field Values

SERVER_FULL

public static final int SERVER_FULL
Status code for a server receiving a connection.

See Also:
Constant Field Values

password

protected String password
Password if connecting to the JOGRE master server.

Constructor Detail

CommGameConnect

public CommGameConnect(int status)
Constructor which takes a status integer.

Parameters:
status -

CommGameConnect

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

Parameters:
message -
Throws:
TransmissionException
Method Detail

getPassword

public String getPassword()
Return the password.

Returns:
Password

setPassword

public void setPassword(String password)
Set the password.

Parameters:
password - Password to set.

flatten

public XMLElement flatten()
Flatten the connect object into a XML communication object.

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