|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.server.control.FreeColServerHolder
net.sf.freecol.server.control.InputHandler
net.sf.freecol.server.control.InGameInputHandler
public final class InGameInputHandler
Handles the network messages that arrives while
in game.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sf.freecol.server.control.InputHandler |
|---|
InputHandler.CurrentPlayerNetworkRequestHandler, InputHandler.NetworkRequestHandler |
| Field Summary | |
|---|---|
private static java.util.logging.Logger |
logger
|
| Fields inherited from interface net.sf.freecol.common.networking.NetworkConstants |
|---|
NO_NEED_FOR_THE_GOODS, NO_TRADE |
| Constructor Summary | |
|---|---|
InGameInputHandler(FreeColServer freeColServer)
The constructor to use. |
|
| Method Summary | |
|---|---|
private org.w3c.dom.Element |
abandonColony(Connection connection,
org.w3c.dom.Element abandonElement)
Handles an "abandonColony"-message from a client. |
private org.w3c.dom.Element |
armedUnitDemandTribute(Connection connection,
org.w3c.dom.Element element)
Handles a "armedUnitDemandTribute"-message from a client. |
private org.w3c.dom.Element |
askSkill(Connection connection,
org.w3c.dom.Element element)
Handles an "askSkill"-message from a client. |
private org.w3c.dom.Element |
assignTeacher(Connection connection,
org.w3c.dom.Element workElement)
Handles a "assignTeacher"-request from a client. |
private org.w3c.dom.Element |
assignTradeRoute(Connection connection,
org.w3c.dom.Element element)
Handles a "assignTradeRoute"-message from a client. |
private org.w3c.dom.Element |
attack(Connection connection,
org.w3c.dom.Element attackElement)
Handles an "attack"-message from a client. |
private org.w3c.dom.Element |
boardShip(Connection connection,
org.w3c.dom.Element boardShipElement)
Handles an "boardShip"-message from a client. |
private org.w3c.dom.Element |
buyGoods(Connection connection,
org.w3c.dom.Element buyGoodsElement)
Handles a "buyGoods"-message from a client. |
private org.w3c.dom.Element |
changeState(Connection connection,
org.w3c.dom.Element changeStateElement)
Handles a "changeState"-message from a client. |
private org.w3c.dom.Element |
changeWorkType(Connection connection,
org.w3c.dom.Element workElement)
Handles a "changeWorkType"-request from a client. |
private org.w3c.dom.Element |
clearSpeciality(Connection connection,
org.w3c.dom.Element clearSpecialityElement)
Handles a "clearSpeciality"-request from a client. |
private org.w3c.dom.Element |
continuePlaying(Connection connection,
org.w3c.dom.Element element)
Handles an "continuePlaying"-message. |
private org.w3c.dom.Element |
createBuilding(Connection connection,
org.w3c.dom.Element element)
Handles a "createBuilding"-message from a client. |
private org.w3c.dom.Element |
createUnit(Connection connection,
org.w3c.dom.Element element)
Handles a "createUnit"-message from a client. |
private void |
demandTribute(IndianSettlement settlement,
Player player,
org.w3c.dom.Element reply)
Demands a tribute to an IndianSettlement |
private org.w3c.dom.Element |
disbandUnit(Connection connection,
org.w3c.dom.Element element)
Handles a "disbandUnit"-message. |
private org.w3c.dom.Element |
embark(Connection connection,
org.w3c.dom.Element embarkElement)
Handles an "embark"-message from a client. |
private org.w3c.dom.Element |
endTurn(Connection connection,
org.w3c.dom.Element element)
Handles an "endTurn" notification from a client. |
private org.w3c.dom.Element |
equipUnit(Connection connection,
org.w3c.dom.Element workElement)
Handles a "equipUnit"-request from a client. |
private void |
exploreLostCityRumour(Unit unit,
ServerPlayer player)
Returns a type of Lost City Rumour. |
private org.w3c.dom.Element |
foreignAffairs(Connection connection,
org.w3c.dom.Element element)
Handles a "foreignAffairs"-message. |
private org.w3c.dom.Element |
getNewTradeRoute(Connection connection,
org.w3c.dom.Element element)
Handles a "getNewTradeRoute"-message from a client. |
private java.util.List<ServerPlayer> |
getOtherPlayers(ServerPlayer serverPlayer)
Get a list of all server players, optionally excluding the supplied one. |
private org.w3c.dom.Element |
getRandom(Connection connection,
org.w3c.dom.Element element)
Handles a "getRandom"-message from a client. |
private org.w3c.dom.Element |
getREFUnits(Connection connection,
org.w3c.dom.Element element)
Handles a "getREFUnits"-message. |
private org.w3c.dom.Element |
getServerStatistics(Connection connection,
org.w3c.dom.Element request)
|
private org.w3c.dom.Element |
getVacantEntryLocation(Connection connection,
org.w3c.dom.Element element)
Handles a "getVacantEntryLocation"-message from a client. |
private org.w3c.dom.Element |
highScores(Connection connection,
org.w3c.dom.Element element)
Handles a "highScores"-message. |
private org.w3c.dom.Element |
inciteAtSettlement(Connection connection,
org.w3c.dom.Element element)
Handles a "inciteAtSettlement"-message from a client. |
private org.w3c.dom.Element |
indianDemand(Connection connection,
org.w3c.dom.Element element)
Handles an "indianDemand"-message. |
private org.w3c.dom.Element |
learnSkillAtSettlement(Connection connection,
org.w3c.dom.Element element)
Handles a "learnSkillAtSettlement"-message from a client. |
private org.w3c.dom.Element |
loadCargo(Connection connection,
org.w3c.dom.Element loadCargoElement)
Handles a "loadCargo"-message from a client. |
protected org.w3c.dom.Element |
logout(Connection connection,
org.w3c.dom.Element logoutElement)
Handles a "logout"-message. |
private org.w3c.dom.Element |
missionaryAtSettlement(Connection connection,
org.w3c.dom.Element element)
Handles a "missionaryAtSettlement"-message from a client. |
private org.w3c.dom.Element |
move(Connection connection,
org.w3c.dom.Element moveElement)
Handles a "move"-message from a client. |
private org.w3c.dom.Element |
moveToAmerica(Connection connection,
org.w3c.dom.Element moveToAmericaElement)
Handles a "moveToAmerica"-message from a client. |
private org.w3c.dom.Element |
moveToEurope(Connection connection,
org.w3c.dom.Element moveToEuropeElement)
Handles a "moveToEurope"-message from a client. |
private org.w3c.dom.Element |
payArrears(Connection connection,
org.w3c.dom.Element payArrearsElement)
Handles a "payArrears"-request from a client. |
private org.w3c.dom.Element |
payForBuilding(Connection connection,
org.w3c.dom.Element payForBuildingElement)
Handles a "payForBuilding"-request from a client. |
private org.w3c.dom.Element |
putOutsideColony(Connection connection,
org.w3c.dom.Element putOutsideColonyElement)
Handles a "putOutsideColony"-request from a client. |
private org.w3c.dom.Element |
recruitUnitInEurope(Connection connection,
org.w3c.dom.Element recruitUnitInEuropeElement)
Handles a "recruitUnitInEurope"-request from a client. |
private org.w3c.dom.Element |
retire(Connection connection,
org.w3c.dom.Element element)
Handles a "retire"-message. |
private org.w3c.dom.Element |
scoutIndianSettlement(Connection connection,
org.w3c.dom.Element element)
Handles a "scoutIndianSettlement"-message from a client. |
private org.w3c.dom.Element |
selectFromFountainYouth(Connection connection,
org.w3c.dom.Element element)
Handles an "selectFromFountainYouth"-message from a client. |
private org.w3c.dom.Element |
sellGoods(Connection connection,
org.w3c.dom.Element sellGoodsElement)
Handles a "sellGoods"-message from a client. |
private void |
sendRemoveUnitToAll(Unit unit,
ServerPlayer serverPlayer)
Tell all players to remove a unit, optionally excluding one. |
private void |
sendUpdatedTileToAll(Tile newTile,
ServerPlayer serverPlayer)
Tell all players to update a tile, optionally excluding one. |
private org.w3c.dom.Element |
setBuildQueue(Connection connection,
org.w3c.dom.Element setBuildQueueElement)
Handles a "setBuildQueue"-request from a client. |
private org.w3c.dom.Element |
setGoodsLevels(Connection connection,
org.w3c.dom.Element setGoodsLevelsElement)
Handles a "setGoodsLevels"-request from a client. |
private org.w3c.dom.Element |
setNewLandName(Connection connection,
org.w3c.dom.Element element)
Handles a "setNewLandName"-message from a client. |
private org.w3c.dom.Element |
setTradeRoutes(Connection connection,
org.w3c.dom.Element element)
Handles a "updateTradeRoute"-message from a client. |
private org.w3c.dom.Element |
trainUnitInEurope(Connection connection,
org.w3c.dom.Element trainUnitInEuropeElement)
Handles a "trainUnitInEurope"-request from a client. |
private org.w3c.dom.Element |
unloadCargo(Connection connection,
org.w3c.dom.Element unloadCargoElement)
Handles an "unloadCargo"-message from a client. |
private org.w3c.dom.Element |
updateTradeRoute(Connection connection,
org.w3c.dom.Element element)
Handles a "setTradeRoutes"-message from a client. |
private org.w3c.dom.Element |
work(Connection connection,
org.w3c.dom.Element workElement)
Handles a "work"-request from a client. |
private org.w3c.dom.Element |
workImprovement(Connection connection,
org.w3c.dom.Element workElement)
Handles a "changeWorkType"-request from a client. |
| Methods inherited from class net.sf.freecol.server.control.InputHandler |
|---|
createErrorReply, handle, logException, register |
| Methods inherited from class net.sf.freecol.server.control.FreeColServerHolder |
|---|
getFreeColServer, getGame |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.util.logging.Logger logger
| Constructor Detail |
|---|
public InGameInputHandler(FreeColServer freeColServer)
freeColServer - The main server object.| Method Detail |
|---|
private java.util.List<ServerPlayer> getOtherPlayers(ServerPlayer serverPlayer)
serverPlayer - A ServerPlayer to exclude (may be
null).
private void sendRemoveUnitToAll(Unit unit,
ServerPlayer serverPlayer)
unit - The Unit to remove.serverPlayer - A ServerPlayer to exclude (may be
null).
private void sendUpdatedTileToAll(Tile newTile,
ServerPlayer serverPlayer)
newTile - The Tile to update.serverPlayer - A ServerPlayer to exclude (may be
null).
private org.w3c.dom.Element setNewLandName(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element createUnit(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element createBuilding(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element getRandom(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element getVacantEntryLocation(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element getNewTradeRoute(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element updateTradeRoute(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element setTradeRoutes(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element assignTradeRoute(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element abandonColony(Connection connection,
org.w3c.dom.Element abandonElement)
connection - The connection the message came from.abandonElement - The element containing the request.
java.lang.IllegalArgumentException - If the data format of the message is
invalid.
java.lang.IllegalStateException - If the request is not accepted by the
model.
private org.w3c.dom.Element move(Connection connection,
org.w3c.dom.Element moveElement)
connection - The connection the message came from.moveElement - The element containing the request.
java.lang.IllegalArgumentException - If the data format of the message is
invalid.
java.lang.IllegalStateException - If the request is not accepted by the
model.
private void exploreLostCityRumour(Unit unit,
ServerPlayer player)
unit - The Unit exploring the lost city rumour.player - The ServerPlayer to send a message to.
private org.w3c.dom.Element selectFromFountainYouth(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
java.lang.IllegalArgumentException - If the data format of the message is
invalid.
java.lang.IllegalStateException - If the request is not accepted by the
model.
private org.w3c.dom.Element askSkill(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
java.lang.IllegalArgumentException - If the data format of the message is
invalid.
java.lang.IllegalStateException - If the request is not accepted by the
model.
private org.w3c.dom.Element attack(Connection connection,
org.w3c.dom.Element attackElement)
connection - The connection the message came from.attackElement - The element containing the request.
java.lang.IllegalArgumentException - If the data format of the message is
invalid.
java.lang.IllegalStateException - If the request is not accepted by the
model.
private org.w3c.dom.Element embark(Connection connection,
org.w3c.dom.Element embarkElement)
connection - The connection the message came from.embarkElement - The element containing the request.
java.lang.IllegalArgumentException - If the data format of the message is
invalid.
private org.w3c.dom.Element boardShip(Connection connection,
org.w3c.dom.Element boardShipElement)
connection - The connection the message came from.boardShipElement - The element containing the request.
private org.w3c.dom.Element learnSkillAtSettlement(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element scoutIndianSettlement(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element armedUnitDemandTribute(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private void demandTribute(IndianSettlement settlement,
Player player,
org.w3c.dom.Element reply)
IndianSettlement
settlement - The IndianSettlement whom demand the
tribute toplayer - The Player which demands the tributereply - The element to add the result
private org.w3c.dom.Element missionaryAtSettlement(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element inciteAtSettlement(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element loadCargo(Connection connection,
org.w3c.dom.Element loadCargoElement)
connection - The connection the message came from.loadCargoElement - The element containing the request.
private org.w3c.dom.Element unloadCargo(Connection connection,
org.w3c.dom.Element unloadCargoElement)
connection - The connection the message came from.unloadCargoElement - The element containing the request.
private org.w3c.dom.Element buyGoods(Connection connection,
org.w3c.dom.Element buyGoodsElement)
connection - The connection the message came from.buyGoodsElement - The element containing the request.
private org.w3c.dom.Element sellGoods(Connection connection,
org.w3c.dom.Element sellGoodsElement)
connection - The connection the message came from.sellGoodsElement - The element containing the request.
private org.w3c.dom.Element moveToEurope(Connection connection,
org.w3c.dom.Element moveToEuropeElement)
connection - The connection the message came from.moveToEuropeElement - The element containing the request.
private org.w3c.dom.Element moveToAmerica(Connection connection,
org.w3c.dom.Element moveToAmericaElement)
connection - The connection the message came from.moveToAmericaElement - The element containing the request.
private org.w3c.dom.Element recruitUnitInEurope(Connection connection,
org.w3c.dom.Element recruitUnitInEuropeElement)
connection - The connection the message came from.recruitUnitInEuropeElement - The element containing the request.
private org.w3c.dom.Element trainUnitInEurope(Connection connection,
org.w3c.dom.Element trainUnitInEuropeElement)
connection - The connection the message came from.trainUnitInEuropeElement - The element containing the request.
private org.w3c.dom.Element equipUnit(Connection connection,
org.w3c.dom.Element workElement)
connection - The connection the message came from.workElement - The element containing the request.
private org.w3c.dom.Element work(Connection connection,
org.w3c.dom.Element workElement)
connection - The connection the message came from.workElement - The element containing the request.
private org.w3c.dom.Element changeWorkType(Connection connection,
org.w3c.dom.Element workElement)
connection - The connection the message came from.workElement - The element containing the request.
private org.w3c.dom.Element workImprovement(Connection connection,
org.w3c.dom.Element workElement)
connection - The connection the message came from.workElement - The element containing the request.
private org.w3c.dom.Element assignTeacher(Connection connection,
org.w3c.dom.Element workElement)
connection - The connection the message came from.workElement - The element containing the request.
private org.w3c.dom.Element setBuildQueue(Connection connection,
org.w3c.dom.Element setBuildQueueElement)
connection - The connection the message came from.setBuildQueueElement - The element containing the request.
private org.w3c.dom.Element changeState(Connection connection,
org.w3c.dom.Element changeStateElement)
connection - The connection the message came from.changeStateElement - The element containing the request.
java.lang.IllegalArgumentException - If the data format of the message is
invalid.
java.lang.IllegalStateException - If the request is not accepted by the
model.
private org.w3c.dom.Element putOutsideColony(Connection connection,
org.w3c.dom.Element putOutsideColonyElement)
connection - The connection the message came from.putOutsideColonyElement - The element containing the request.
private org.w3c.dom.Element payForBuilding(Connection connection,
org.w3c.dom.Element payForBuildingElement)
connection - The connection the message came from.payForBuildingElement - The element containing the request.
private org.w3c.dom.Element payArrears(Connection connection,
org.w3c.dom.Element payArrearsElement)
connection - The connection the message came from.payArrearsElement - The element containing the request.
private org.w3c.dom.Element setGoodsLevels(Connection connection,
org.w3c.dom.Element setGoodsLevelsElement)
connection - The connection the message came from.setGoodsLevelsElement - The element containing the request.
private org.w3c.dom.Element clearSpeciality(Connection connection,
org.w3c.dom.Element clearSpecialityElement)
connection - The connection the message came from.clearSpecialityElement - The element containing the request.
private org.w3c.dom.Element endTurn(Connection connection,
org.w3c.dom.Element element)
connection - The connection the message came from.element - The element containing the request.
private org.w3c.dom.Element disbandUnit(Connection connection,
org.w3c.dom.Element element)
connection - The Connection the message was received
on.element - The element containing the request.
private org.w3c.dom.Element foreignAffairs(Connection connection,
org.w3c.dom.Element element)
connection - The Connection the message was received
on.element - The element containing the request.
private org.w3c.dom.Element highScores(Connection connection,
org.w3c.dom.Element element)
connection - The Connection the message was received
on.element - The element containing the request.
private org.w3c.dom.Element retire(Connection connection,
org.w3c.dom.Element element)
connection - The Connection the message was received
on.element - The element containing the request.
private org.w3c.dom.Element getREFUnits(Connection connection,
org.w3c.dom.Element element)
connection - The Connection the message was received
on.element - The element containing the request.
private org.w3c.dom.Element indianDemand(Connection connection,
org.w3c.dom.Element element)
connection - The Connection the message was received
on.element - The element containing the request.
private org.w3c.dom.Element continuePlaying(Connection connection,
org.w3c.dom.Element element)
connection - The Connection the message was received
on.element - The element containing the request.
protected org.w3c.dom.Element logout(Connection connection,
org.w3c.dom.Element logoutElement)
logout in class InputHandlerconnection - The Connection the message was received
on.logoutElement - The element (root element in a DOM-parsed XML tree)
that holds all the information.
private org.w3c.dom.Element getServerStatistics(Connection connection,
org.w3c.dom.Element request)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||