|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.networking.DOMMessage
net.sf.freecol.common.networking.MonarchActionMessage
public class MonarchActionMessage
The message sent when doing a monarch action.
| Field Summary | |
|---|---|
private Monarch.MonarchAction |
action
|
private java.lang.String |
resultString
|
private java.lang.String |
tax
|
private StringTemplate |
template
|
| Fields inherited from class net.sf.freecol.common.networking.DOMMessage |
|---|
document, logger |
| Constructor Summary | |
|---|---|
MonarchActionMessage(Game game,
org.w3c.dom.Element element)
Create a new MonarchActionMessage from a
supplied element. |
|
MonarchActionMessage(Monarch.MonarchAction action,
StringTemplate template)
Create a new MonarchActionMessage with the given action. |
|
| Method Summary | |
|---|---|
Monarch.MonarchAction |
getAction()
Gets the monarch action type of this message. |
boolean |
getResult()
Gets the result. |
int |
getTax()
Gets the tax amount attached to this message. |
StringTemplate |
getTemplate()
Gets the template of this message. |
static java.lang.String |
getXMLElementTagName()
The tag name of the root element representing this object. |
org.w3c.dom.Element |
handle(FreeColServer server,
Player player,
Connection connection)
Handles a "monarchAction"-message. |
void |
setResult(boolean accepted)
Sets the result. |
void |
setTax(int tax)
Sets the tax amount attached to this message. |
org.w3c.dom.Element |
toXMLElement()
Convert this MonarchMessage to XML. |
| Methods inherited from class net.sf.freecol.common.networking.DOMMessage |
|---|
clientError, collapseElements, createError, createError, createNewDocument, createNewRootElement, elementToString, getAttribute, getChildElement, getDocument, getFreeColProtocolVersion, getType, hasAttribute, insertAsRoot, isType, setAttribute, setAttribute, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Monarch.MonarchAction action
private StringTemplate template
private java.lang.String tax
private java.lang.String resultString
| Constructor Detail |
|---|
public MonarchActionMessage(Monarch.MonarchAction action,
StringTemplate template)
MonarchActionMessage with the given action.
action - The MonarchAction to do.
public MonarchActionMessage(Game game,
org.w3c.dom.Element element)
MonarchActionMessage from a
supplied element.
game - The Game this message belongs to.element - The Element to use to create the message.| Method Detail |
|---|
public Monarch.MonarchAction getAction()
public StringTemplate getTemplate()
public int getTax()
public void setTax(int tax)
tax - The tax amount.public boolean getResult()
public void setResult(boolean accepted)
accept - The new result.
public org.w3c.dom.Element handle(FreeColServer server,
Player player,
Connection connection)
server - The FreeColServer handling the message.player - The Player the message applies to.connection - The Connection message was received on.
public org.w3c.dom.Element toXMLElement()
toXMLElement in class DOMMessagepublic static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||