|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.client.control.InputHandler
net.sf.freecol.client.control.PreGameInputHandler
public final class PreGameInputHandler
Handles the network messages that arrives before the game starts.
| Field Summary | |
|---|---|
private static java.util.logging.Logger |
logger
|
| Fields inherited from class net.sf.freecol.client.control.InputHandler |
|---|
gui |
| Constructor Summary | |
|---|---|
PreGameInputHandler(FreeColClient freeColClient,
GUI gui)
The constructor to use. |
|
| Method Summary | |
|---|---|
boolean |
accepts(java.lang.String tagName)
Checks if the message handler support the given message. |
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. |
void |
handle(Connection connection,
javax.xml.stream.XMLStreamReader in,
javax.xml.stream.XMLStreamWriter out)
Handles the main element of an XML message. |
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 void |
updateGame(Connection connection,
javax.xml.stream.XMLStreamReader in,
javax.xml.stream.XMLStreamWriter out)
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. |
| Methods inherited from class net.sf.freecol.client.control.InputHandler |
|---|
disconnect, getFreeColClient, getGame |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.logging.Logger logger
| Constructor Detail |
|---|
public PreGameInputHandler(FreeColClient freeColClient,
GUI gui)
freeColClient - The main controller.| Method Detail |
|---|
public org.w3c.dom.Element handle(Connection connection,
org.w3c.dom.Element element)
handle in interface MessageHandlerhandle in class InputHandlerconnection - The Connection the message was received on.element - The root element of the message.
public void handle(Connection connection,
javax.xml.stream.XMLStreamReader in,
javax.xml.stream.XMLStreamWriter out)
handle in interface StreamedMessageHandlerconnection - The connection the message came from.in - The stream containing the message.out - The output stream for the reply.public boolean accepts(java.lang.String tagName)
accepts in interface StreamedMessageHandlertagName - The tag name of the message to check.
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 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 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 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 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 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.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 void updateGame(Connection connection,
javax.xml.stream.XMLStreamReader in,
javax.xml.stream.XMLStreamWriter out)
connection - The Connection the message
will be read from.in - The stream to read the message from.out - The stream for the reply.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 logout(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.
public org.w3c.dom.Element multiple(Connection connection,
org.w3c.dom.Element element)
connection - Connectionelement - The element (root element in a DOM-parsed XML tree) that
holds all the information.
Element
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||