|
|||||||||
| 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.SetTradeRoutesMessage
public class SetTradeRoutesMessage
The message sent when setting the trade routes.
| Field Summary | |
|---|---|
private static java.lang.String |
idPrefix
|
private java.util.List<TradeRoute> |
tradeRoutes
The trade routes to set. |
| Fields inherited from class net.sf.freecol.common.networking.DOMMessage |
|---|
document, logger |
| Constructor Summary | |
|---|---|
SetTradeRoutesMessage(Game game,
org.w3c.dom.Element element)
Create a new SetTradeRoutesMessage from a
supplied element. |
|
SetTradeRoutesMessage(java.util.List<TradeRoute> tradeRoutes)
Create a new SetTradeRoutesMessage with the
supplied routes. |
|
| Method Summary | |
|---|---|
static java.lang.String |
getPrefix(TradeRoute route)
|
static java.lang.String |
getXMLElementTagName()
The tag name of the root element representing this object. |
org.w3c.dom.Element |
handle(FreeColServer server,
Connection connection)
Handle a "setTradeRoutes"-message. |
static boolean |
hasPrefix(TradeRoute route)
|
static java.lang.String |
removePrefix(TradeRoute route)
|
org.w3c.dom.Element |
toXMLElement()
Convert this SetTradeRoutesMessage to XML. |
static TradeRoute |
tradeRouteFromElement(Game game,
org.w3c.dom.Element element)
Creates a trade route from an element. |
| 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 static final java.lang.String idPrefix
private java.util.List<TradeRoute> tradeRoutes
| Constructor Detail |
|---|
public SetTradeRoutesMessage(java.util.List<TradeRoute> tradeRoutes)
SetTradeRoutesMessage with the
supplied routes.
tradeRoutes - A list of TradeRoutes to set.
public SetTradeRoutesMessage(Game game,
org.w3c.dom.Element element)
SetTradeRoutesMessage from a
supplied element.
game - The Game this message belongs to.element - The Element to use to create the message.| Method Detail |
|---|
public static TradeRoute tradeRouteFromElement(Game game,
org.w3c.dom.Element element)
game - The Game to create in.element - An Element to read from.
TradeRoute on success, null on error.public static java.lang.String getPrefix(TradeRoute route)
public static java.lang.String removePrefix(TradeRoute route)
public static boolean hasPrefix(TradeRoute route)
public org.w3c.dom.Element handle(FreeColServer server,
Connection connection)
server - The FreeColServer handling the message.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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||