public final class PreGameInputHandler extends InputHandler
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
logger |
Constructor and Description |
---|
PreGameInputHandler(FreeColClient freeColClient)
The constructor to use.
|
Modifier and Type | Method and Description |
---|---|
private org.w3c.dom.Element |
addPlayer(org.w3c.dom.Element element)
Handles an "addPlayer"-message.
|
private org.w3c.dom.Element |
chat(org.w3c.dom.Element element)
Handles a "chat"-message.
|
private org.w3c.dom.Element |
error(org.w3c.dom.Element element)
Handles an "error"-message.
|
org.w3c.dom.Element |
handle(Connection connection,
org.w3c.dom.Element element)
Deals with incoming messages that have just been received.
|
private org.w3c.dom.Element |
logout(org.w3c.dom.Element element)
Handles an "logout"-message.
|
org.w3c.dom.Element |
multiple(Connection connection,
org.w3c.dom.Element element)
Handle all the children of this element.
|
private org.w3c.dom.Element |
playerReady(org.w3c.dom.Element element)
Handles a "playerReady"-message.
|
private org.w3c.dom.Element |
removePlayer(org.w3c.dom.Element element)
Handles a "removePlayer"-message.
|
private org.w3c.dom.Element |
setAvailable(org.w3c.dom.Element element)
Handles a "setAvailable"-message.
|
private org.w3c.dom.Element |
startGame(org.w3c.dom.Element element)
Handles an "startGame"-message.
|
private org.w3c.dom.Element |
updateColor(org.w3c.dom.Element element)
Handles an "updateColor"-message.
|
private org.w3c.dom.Element |
updateGame(org.w3c.dom.Element element)
Handles an "updateGame"-message.
|
private org.w3c.dom.Element |
updateGameOptions(org.w3c.dom.Element element)
Handles an "updateGameOptions"-message.
|
private org.w3c.dom.Element |
updateMapGeneratorOptions(org.w3c.dom.Element element)
Handles an "updateMapGeneratorOptions"-message.
|
private org.w3c.dom.Element |
updateNation(org.w3c.dom.Element element)
Handles an "updateNation"-message.
|
private org.w3c.dom.Element |
updateNationType(org.w3c.dom.Element element)
Handles an "updateNationType"-message.
|
disconnect, getFreeColClient, getGame, getGUI, unknown
public PreGameInputHandler(FreeColClient freeColClient)
freeColClient
- The FreeColClient
for the game.public org.w3c.dom.Element handle(Connection connection, org.w3c.dom.Element element)
handle
in interface MessageHandler
handle
in class InputHandler
connection
- The Connection
the message was
received on.element
- The root Element
of the message.private org.w3c.dom.Element addPlayer(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element chat(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element error(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML
tree) that holds all the information.private org.w3c.dom.Element logout(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.public org.w3c.dom.Element multiple(Connection connection, org.w3c.dom.Element element)
connection
- The Connection
the element arrived on.element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.Element
.private org.w3c.dom.Element playerReady(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element removePlayer(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element setAvailable(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element startGame(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML
tree) that holds all the information.private org.w3c.dom.Element updateColor(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element updateGame(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element updateGameOptions(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element updateMapGeneratorOptions(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element updateNation(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.private org.w3c.dom.Element updateNationType(org.w3c.dom.Element element)
element
- The element (root element in a DOM-parsed XML tree) that
holds all the information.