public class SellGoodsMessage extends DOMMessage
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
amountString
The amount of goods to sell.
|
private java.lang.String |
carrierId
The identifier of the carrier to unload to goods from.
|
private java.lang.String |
goodsTypeId
The identifier of the type of goods to sell.
|
document, logger| Constructor and Description |
|---|
SellGoodsMessage(Game game,
org.w3c.dom.Element element)
Create a new
SellGoodsMessage from a
supplied element. |
SellGoodsMessage(Goods goods,
Unit carrier)
Create a new
SellGoodsMessage. |
| Modifier and Type | Method and Description |
|---|---|
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)
Handle a "sellGoods"-message.
|
org.w3c.dom.Element |
toXMLElement()
Convert this SellGoodsMessage to XML.
|
clientError, collapseElements, createError, createError, createMessage, createMessage, createNewDocument, createNewRootElement, elementToString, getAttribute, getChildElement, getDocument, getFreeColProtocolVersion, getType, hasAttribute, insertAsRoot, isType, setAttribute, setAttribute, toStringprivate java.lang.String carrierId
private java.lang.String goodsTypeId
private java.lang.String amountString
public SellGoodsMessage(Goods goods, Unit carrier)
SellGoodsMessage.goods - The Goods to sell.carrier - The Unit carrying the goods.public SellGoodsMessage(Game game, org.w3c.dom.Element element)
SellGoodsMessage from a
supplied element.game - The Game this message belongs to.element - The Element to use to create the message.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.Element on failure.public org.w3c.dom.Element toXMLElement()
toXMLElement in class DOMMessagepublic static java.lang.String getXMLElementTagName()