net.sf.freecol.server.control
Class InGameInputHandler

java.lang.Object
  extended by net.sf.freecol.server.control.FreeColServerHolder
      extended by net.sf.freecol.server.control.InputHandler
          extended by net.sf.freecol.server.control.InGameInputHandler
All Implemented Interfaces:
MessageHandler, NetworkConstants

public final class InGameInputHandler
extends InputHandler
implements NetworkConstants

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

logger

private static java.util.logging.Logger logger
Constructor Detail

InGameInputHandler

public InGameInputHandler(FreeColServer freeColServer)
The constructor to use.

Parameters:
freeColServer - The main server object.
Method Detail

getOtherPlayers

private java.util.List<ServerPlayer> getOtherPlayers(ServerPlayer serverPlayer)
Get a list of all server players, optionally excluding the supplied one.

Parameters:
serverPlayer - A ServerPlayer to exclude (may be null).
Returns:
A list of all connected server players except one.

sendRemoveUnitToAll

private void sendRemoveUnitToAll(Unit unit,
                                 ServerPlayer serverPlayer)
Tell all players to remove a unit, optionally excluding one.

Parameters:
unit - The Unit to remove.
serverPlayer - A ServerPlayer to exclude (may be null).

sendUpdatedTileToAll

private void sendUpdatedTileToAll(Tile newTile,
                                  ServerPlayer serverPlayer)
Tell all players to update a tile, optionally excluding one.

Parameters:
newTile - The Tile to update.
serverPlayer - A ServerPlayer to exclude (may be null).

setNewLandName

private org.w3c.dom.Element setNewLandName(Connection connection,
                                           org.w3c.dom.Element element)
Handles a "setNewLandName"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

createUnit

private org.w3c.dom.Element createUnit(Connection connection,
                                       org.w3c.dom.Element element)
Handles a "createUnit"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

createBuilding

private org.w3c.dom.Element createBuilding(Connection connection,
                                           org.w3c.dom.Element element)
Handles a "createBuilding"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

getRandom

private org.w3c.dom.Element getRandom(Connection connection,
                                      org.w3c.dom.Element element)
Handles a "getRandom"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

getVacantEntryLocation

private org.w3c.dom.Element getVacantEntryLocation(Connection connection,
                                                   org.w3c.dom.Element element)
Handles a "getVacantEntryLocation"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

getNewTradeRoute

private org.w3c.dom.Element getNewTradeRoute(Connection connection,
                                             org.w3c.dom.Element element)
Handles a "getNewTradeRoute"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

updateTradeRoute

private org.w3c.dom.Element updateTradeRoute(Connection connection,
                                             org.w3c.dom.Element element)
Handles a "setTradeRoutes"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

setTradeRoutes

private org.w3c.dom.Element setTradeRoutes(Connection connection,
                                           org.w3c.dom.Element element)
Handles a "updateTradeRoute"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

assignTradeRoute

private org.w3c.dom.Element assignTradeRoute(Connection connection,
                                             org.w3c.dom.Element element)
Handles a "assignTradeRoute"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

abandonColony

private org.w3c.dom.Element abandonColony(Connection connection,
                                          org.w3c.dom.Element abandonElement)
Handles an "abandonColony"-message from a client.

Parameters:
connection - The connection the message came from.
abandonElement - The element containing the request.
Throws:
java.lang.IllegalArgumentException - If the data format of the message is invalid.
java.lang.IllegalStateException - If the request is not accepted by the model.

move

private org.w3c.dom.Element move(Connection connection,
                                 org.w3c.dom.Element moveElement)
Handles a "move"-message from a client.

Parameters:
connection - The connection the message came from.
moveElement - The element containing the request.
Throws:
java.lang.IllegalArgumentException - If the data format of the message is invalid.
java.lang.IllegalStateException - If the request is not accepted by the model.

exploreLostCityRumour

private void exploreLostCityRumour(Unit unit,
                                   ServerPlayer player)
Returns a type of Lost City Rumour. The type of rumour depends on the exploring unit, as well as player settings.

Parameters:
unit - The Unit exploring the lost city rumour.
player - The ServerPlayer to send a message to.

selectFromFountainYouth

private org.w3c.dom.Element selectFromFountainYouth(Connection connection,
                                                    org.w3c.dom.Element element)
Handles an "selectFromFountainYouth"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.
Throws:
java.lang.IllegalArgumentException - If the data format of the message is invalid.
java.lang.IllegalStateException - If the request is not accepted by the model.

askSkill

private org.w3c.dom.Element askSkill(Connection connection,
                                     org.w3c.dom.Element element)
Handles an "askSkill"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.
Throws:
java.lang.IllegalArgumentException - If the data format of the message is invalid.
java.lang.IllegalStateException - If the request is not accepted by the model.

attack

private org.w3c.dom.Element attack(Connection connection,
                                   org.w3c.dom.Element attackElement)
Handles an "attack"-message from a client.

Parameters:
connection - The connection the message came from.
attackElement - The element containing the request.
Throws:
java.lang.IllegalArgumentException - If the data format of the message is invalid.
java.lang.IllegalStateException - If the request is not accepted by the model.

embark

private org.w3c.dom.Element embark(Connection connection,
                                   org.w3c.dom.Element embarkElement)
Handles an "embark"-message from a client.

Parameters:
connection - The connection the message came from.
embarkElement - The element containing the request.
Throws:
java.lang.IllegalArgumentException - If the data format of the message is invalid.

boardShip

private org.w3c.dom.Element boardShip(Connection connection,
                                      org.w3c.dom.Element boardShipElement)
Handles an "boardShip"-message from a client.

Parameters:
connection - The connection the message came from.
boardShipElement - The element containing the request.

learnSkillAtSettlement

private org.w3c.dom.Element learnSkillAtSettlement(Connection connection,
                                                   org.w3c.dom.Element element)
Handles a "learnSkillAtSettlement"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

scoutIndianSettlement

private org.w3c.dom.Element scoutIndianSettlement(Connection connection,
                                                  org.w3c.dom.Element element)
Handles a "scoutIndianSettlement"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

armedUnitDemandTribute

private org.w3c.dom.Element armedUnitDemandTribute(Connection connection,
                                                   org.w3c.dom.Element element)
Handles a "armedUnitDemandTribute"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

demandTribute

private void demandTribute(IndianSettlement settlement,
                           Player player,
                           org.w3c.dom.Element reply)
Demands a tribute to an IndianSettlement

Parameters:
settlement - The IndianSettlement whom demand the tribute to
player - The Player which demands the tribute
reply - The element to add the result

missionaryAtSettlement

private org.w3c.dom.Element missionaryAtSettlement(Connection connection,
                                                   org.w3c.dom.Element element)
Handles a "missionaryAtSettlement"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

inciteAtSettlement

private org.w3c.dom.Element inciteAtSettlement(Connection connection,
                                               org.w3c.dom.Element element)
Handles a "inciteAtSettlement"-message from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

loadCargo

private org.w3c.dom.Element loadCargo(Connection connection,
                                      org.w3c.dom.Element loadCargoElement)
Handles a "loadCargo"-message from a client.

Parameters:
connection - The connection the message came from.
loadCargoElement - The element containing the request.

unloadCargo

private org.w3c.dom.Element unloadCargo(Connection connection,
                                        org.w3c.dom.Element unloadCargoElement)
Handles an "unloadCargo"-message from a client.

Parameters:
connection - The connection the message came from.
unloadCargoElement - The element containing the request.

buyGoods

private org.w3c.dom.Element buyGoods(Connection connection,
                                     org.w3c.dom.Element buyGoodsElement)
Handles a "buyGoods"-message from a client.

Parameters:
connection - The connection the message came from.
buyGoodsElement - The element containing the request.

sellGoods

private org.w3c.dom.Element sellGoods(Connection connection,
                                      org.w3c.dom.Element sellGoodsElement)
Handles a "sellGoods"-message from a client.

Parameters:
connection - The connection the message came from.
sellGoodsElement - The element containing the request.

moveToEurope

private org.w3c.dom.Element moveToEurope(Connection connection,
                                         org.w3c.dom.Element moveToEuropeElement)
Handles a "moveToEurope"-message from a client.

Parameters:
connection - The connection the message came from.
moveToEuropeElement - The element containing the request.

moveToAmerica

private org.w3c.dom.Element moveToAmerica(Connection connection,
                                          org.w3c.dom.Element moveToAmericaElement)
Handles a "moveToAmerica"-message from a client.

Parameters:
connection - The connection the message came from.
moveToAmericaElement - The element containing the request.

recruitUnitInEurope

private org.w3c.dom.Element recruitUnitInEurope(Connection connection,
                                                org.w3c.dom.Element recruitUnitInEuropeElement)
Handles a "recruitUnitInEurope"-request from a client.

Parameters:
connection - The connection the message came from.
recruitUnitInEuropeElement - The element containing the request.

trainUnitInEurope

private org.w3c.dom.Element trainUnitInEurope(Connection connection,
                                              org.w3c.dom.Element trainUnitInEuropeElement)
Handles a "trainUnitInEurope"-request from a client.

Parameters:
connection - The connection the message came from.
trainUnitInEuropeElement - The element containing the request.

equipUnit

private org.w3c.dom.Element equipUnit(Connection connection,
                                      org.w3c.dom.Element workElement)
Handles a "equipUnit"-request from a client.

Parameters:
connection - The connection the message came from.
workElement - The element containing the request.

work

private org.w3c.dom.Element work(Connection connection,
                                 org.w3c.dom.Element workElement)
Handles a "work"-request from a client.

Parameters:
connection - The connection the message came from.
workElement - The element containing the request.

changeWorkType

private org.w3c.dom.Element changeWorkType(Connection connection,
                                           org.w3c.dom.Element workElement)
Handles a "changeWorkType"-request from a client.

Parameters:
connection - The connection the message came from.
workElement - The element containing the request.

workImprovement

private org.w3c.dom.Element workImprovement(Connection connection,
                                            org.w3c.dom.Element workElement)
Handles a "changeWorkType"-request from a client.

Parameters:
connection - The connection the message came from.
workElement - The element containing the request.

assignTeacher

private org.w3c.dom.Element assignTeacher(Connection connection,
                                          org.w3c.dom.Element workElement)
Handles a "assignTeacher"-request from a client.

Parameters:
connection - The connection the message came from.
workElement - The element containing the request.

setBuildQueue

private org.w3c.dom.Element setBuildQueue(Connection connection,
                                          org.w3c.dom.Element setBuildQueueElement)
Handles a "setBuildQueue"-request from a client.

Parameters:
connection - The connection the message came from.
setBuildQueueElement - The element containing the request.

changeState

private org.w3c.dom.Element changeState(Connection connection,
                                        org.w3c.dom.Element changeStateElement)
Handles a "changeState"-message from a client.

Parameters:
connection - The connection the message came from.
changeStateElement - The element containing the request.
Returns:
null (always).
Throws:
java.lang.IllegalArgumentException - If the data format of the message is invalid.
java.lang.IllegalStateException - If the request is not accepted by the model.

putOutsideColony

private org.w3c.dom.Element putOutsideColony(Connection connection,
                                             org.w3c.dom.Element putOutsideColonyElement)
Handles a "putOutsideColony"-request from a client.

Parameters:
connection - The connection the message came from.
putOutsideColonyElement - The element containing the request.

payForBuilding

private org.w3c.dom.Element payForBuilding(Connection connection,
                                           org.w3c.dom.Element payForBuildingElement)
Handles a "payForBuilding"-request from a client.

Parameters:
connection - The connection the message came from.
payForBuildingElement - The element containing the request.

payArrears

private org.w3c.dom.Element payArrears(Connection connection,
                                       org.w3c.dom.Element payArrearsElement)
Handles a "payArrears"-request from a client.

Parameters:
connection - The connection the message came from.
payArrearsElement - The element containing the request.

setGoodsLevels

private org.w3c.dom.Element setGoodsLevels(Connection connection,
                                           org.w3c.dom.Element setGoodsLevelsElement)
Handles a "setGoodsLevels"-request from a client.

Parameters:
connection - The connection the message came from.
setGoodsLevelsElement - The element containing the request.

clearSpeciality

private org.w3c.dom.Element clearSpeciality(Connection connection,
                                            org.w3c.dom.Element clearSpecialityElement)
Handles a "clearSpeciality"-request from a client.

Parameters:
connection - The connection the message came from.
clearSpecialityElement - The element containing the request.

endTurn

private org.w3c.dom.Element endTurn(Connection connection,
                                    org.w3c.dom.Element element)
Handles an "endTurn" notification from a client.

Parameters:
connection - The connection the message came from.
element - The element containing the request.

disbandUnit

private org.w3c.dom.Element disbandUnit(Connection connection,
                                        org.w3c.dom.Element element)
Handles a "disbandUnit"-message.

Parameters:
connection - The Connection the message was received on.
element - The element containing the request.

foreignAffairs

private org.w3c.dom.Element foreignAffairs(Connection connection,
                                           org.w3c.dom.Element element)
Handles a "foreignAffairs"-message.

Parameters:
connection - The Connection the message was received on.
element - The element containing the request.

highScores

private org.w3c.dom.Element highScores(Connection connection,
                                       org.w3c.dom.Element element)
Handles a "highScores"-message.

Parameters:
connection - The Connection the message was received on.
element - The element containing the request.

retire

private org.w3c.dom.Element retire(Connection connection,
                                   org.w3c.dom.Element element)
Handles a "retire"-message.

Parameters:
connection - The Connection the message was received on.
element - The element containing the request.

getREFUnits

private org.w3c.dom.Element getREFUnits(Connection connection,
                                        org.w3c.dom.Element element)
Handles a "getREFUnits"-message.

Parameters:
connection - The Connection the message was received on.
element - The element containing the request.

indianDemand

private org.w3c.dom.Element indianDemand(Connection connection,
                                         org.w3c.dom.Element element)
Handles an "indianDemand"-message.

Parameters:
connection - The Connection the message was received on.
element - The element containing the request.

continuePlaying

private org.w3c.dom.Element continuePlaying(Connection connection,
                                            org.w3c.dom.Element element)
Handles an "continuePlaying"-message.

Parameters:
connection - The Connection the message was received on.
element - The element containing the request.

logout

protected org.w3c.dom.Element logout(Connection connection,
                                     org.w3c.dom.Element logoutElement)
Handles a "logout"-message.

Specified by:
logout in class InputHandler
Parameters:
connection - The Connection the message was received on.
logoutElement - The element (root element in a DOM-parsed XML tree) that holds all the information.
Returns:
The reply.

getServerStatistics

private org.w3c.dom.Element getServerStatistics(Connection connection,
                                                org.w3c.dom.Element request)