public abstract class InputHandler extends java.lang.Object implements MessageHandler
| Modifier and Type | Field and Description |
|---|---|
private FreeColClient |
freeColClient
The main FreeCol client object.
|
private static java.util.logging.Logger |
logger |
| Constructor and Description |
|---|
InputHandler(FreeColClient freeColClient)
The constructor to use.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.w3c.dom.Element |
disconnect(org.w3c.dom.Element element)
Handles a "disconnect"-message.
|
protected FreeColClient |
getFreeColClient()
Gets the main freecol client object.
|
protected Game |
getGame()
Gets the Game.
|
protected GUI |
getGUI()
Gets the GUI.
|
abstract org.w3c.dom.Element |
handle(Connection connection,
org.w3c.dom.Element element)
Deals with incoming messages that have just been received.
|
protected org.w3c.dom.Element |
unknown(org.w3c.dom.Element element)
Handles a message of unknown type.
|
private static final java.util.logging.Logger logger
private final FreeColClient freeColClient
public InputHandler(FreeColClient freeColClient)
freeColClient - The FreeColClient for the game.protected FreeColClient getFreeColClient()
protected GUI getGUI()
protected Game getGame()
Game.public abstract org.w3c.dom.Element handle(Connection connection, org.w3c.dom.Element element)
handle in interface MessageHandlerconnection - The Connection the message was
received on.element - The root Element of the message.protected org.w3c.dom.Element disconnect(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.protected org.w3c.dom.Element unknown(org.w3c.dom.Element element)
element - The element (root element in a DOM-parsed XML tree) that
holds all the information.