org.jogre.common.comm
Class CommOfferDraw
java.lang.Object
org.jogre.common.comm.CommBaseMessage
org.jogre.common.comm.CommGameMessage
org.jogre.common.comm.CommTableMessage
org.jogre.common.comm.CommOfferDraw
- All Implemented Interfaces:
- ITransmittable
- public class CommOfferDraw
- extends CommTableMessage
Communications object which is used when one user offers a draw to another
user.
- Version:
- Alpha 0.2.1
- Author:
- Bob Marks
Constructor Summary |
CommOfferDraw(int status)
Constructor which is called from the server and the client who is
offering the draw - they are unsure of who the draw is being offered to
so the usernameTo (from CommInvite) isn't used. |
CommOfferDraw(int status,
String usernameTo)
Constructor for a CommOfferDraw object. |
CommOfferDraw(XMLElement message)
Constructor which creates a CommOfferDraw object from the flatten ()
method of another CommInvite object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommOfferDraw
public CommOfferDraw(int status)
- Constructor which is called from the server and the client who is
offering the draw - they are unsure of who the draw is being offered to
so the usernameTo (from CommInvite) isn't used.
- Parameters:
status
-
CommOfferDraw
public CommOfferDraw(int status,
String usernameTo)
- Constructor for a CommOfferDraw object. This constructor is created
from the client. The additional field is the usernameTo.
- Parameters:
status
- Status of the message i.e. request, accept & decline.usernameTo
- Username that is being offered the draw to.
CommOfferDraw
public CommOfferDraw(XMLElement message)
throws TransmissionException
- Constructor which creates a CommOfferDraw object from the flatten ()
method of another CommInvite object.
- Parameters:
message
-
- Throws:
TransmissionException
flatten
public XMLElement flatten()
- Flatten the String.
- Returns:
- XML version of the state of an object which can be constructed again.
- See Also:
ITransmittable.flatten()