org.jogre.common.comm
Class CommError

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

public class CommError
extends CommBaseMessage

Communications class which is used to send an error from the server to a client or vice-versa.

Version:
Alpha 0.2.1
Author:
Bob Marks

Field Summary
static int GENERAL_ERROR
          General error.
 
Fields inherited from class org.jogre.common.comm.CommBaseMessage
layer, status, username, XML_ATT_LAYER
 
Constructor Summary
CommError(int errorCode)
          Constructor to an error message.
CommError(XMLElement message)
          Constructor which creates a CommError object from the flatten () method of another CommError object.
 
Method Summary
 XMLElement flatten()
          This method flattens an ITransmittable object into a XMLElement which can be transmitted.
 
Methods inherited from class org.jogre.common.comm.CommBaseMessage
flatten, getStatus, getUsername, setUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERAL_ERROR

public static final int GENERAL_ERROR
General error.

See Also:
Constant Field Values
Constructor Detail

CommError

public CommError(int errorCode)
Constructor to an error message.

Parameters:
errorCode -

CommError

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

Parameters:
message -
Throws:
TransmissionException
Method Detail

flatten

public XMLElement flatten()
Description copied from interface: ITransmittable
This method flattens an ITransmittable object into a XMLElement which can be transmitted. The object can then be recreated again using a single XMLElement parameter constructor.

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