net.sf.freecol.client.control
Class InGameInputHandler

java.lang.Object
  extended by net.sf.freecol.client.control.InputHandler
      extended by net.sf.freecol.client.control.InGameInputHandler
All Implemented Interfaces:
MessageHandler

public final class InGameInputHandler
extends InputHandler

Handles the network messages that arrives while in the getGame().


Constructor Summary
InGameInputHandler(FreeColClient freeColClient)
          The constructor to use.
 
Method Summary
 org.w3c.dom.Element addHistory(org.w3c.dom.Element element)
          Add the HistoryEvents which are the children of this Element.
 org.w3c.dom.Element addMessages(org.w3c.dom.Element element)
          Add the ModelMessages which are the children of this Element.
 org.w3c.dom.Element disposeUnits(org.w3c.dom.Element element)
          Disposes of the Units which are the children of this Element.
 org.w3c.dom.Element handle(Connection connection, org.w3c.dom.Element element)
          Deals with incoming messages that have just been received.
 org.w3c.dom.Element multiple(Connection connection, org.w3c.dom.Element element)
          Handle all the children of this element.
 org.w3c.dom.Element update(org.w3c.dom.Element updateElement)
          Handles an "update"-message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InGameInputHandler

public InGameInputHandler(FreeColClient freeColClient)
The constructor to use.

Parameters:
freeColClient - The main controller.
Method Detail

handle

public org.w3c.dom.Element handle(Connection connection,
                                  org.w3c.dom.Element element)
Deals with incoming messages that have just been received.

Specified by:
handle in interface MessageHandler
Specified by:
handle in class InputHandler
Parameters:
connection - The Connection the message was received on.
element - The root element of the message.
Returns:
The reply.

update

public org.w3c.dom.Element update(org.w3c.dom.Element updateElement)
Handles an "update"-message.

Parameters:
updateElement - The element (root element in a DOM-parsed XML tree) that holds all the information.
Returns:
The reply.

disposeUnits

public org.w3c.dom.Element disposeUnits(org.w3c.dom.Element element)
Disposes of the Units which are the children of this Element.

Parameters:
element - The element (root element in a DOM-parsed XML tree) that holds all the information.

addMessages

public org.w3c.dom.Element addMessages(org.w3c.dom.Element element)
Add the ModelMessages which are the children of this Element.

Parameters:
element - The element (root element in a DOM-parsed XML tree) that holds all the information.

addHistory

public org.w3c.dom.Element addHistory(org.w3c.dom.Element element)
Add the HistoryEvents which are the children of this Element.

Parameters:
element - The element (root element in a DOM-parsed XML tree) that holds all the information.

multiple

public org.w3c.dom.Element multiple(Connection connection,
                                    org.w3c.dom.Element element)
Handle all the children of this element.

Parameters:
element - The element (root element in a DOM-parsed XML tree) that holds all the information.