|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.limdul.cassiopeia.control.metaserver.client.MetaServerClientModus
public abstract class MetaServerClientModus
Modus für den Client, der den Status beim Metaserver angibt.
| Field Summary | |
|---|---|
static int |
CONNECTING
|
static int |
LOBBY
|
static int |
OPEN_GAME
|
| Constructor Summary | |
|---|---|
MetaServerClientModus()
|
|
| Method Summary | |
|---|---|
protected void |
addExpectedGame(int command)
Fügt ein neues GameCommand zu den erwarteten GameCommands hinzu. |
protected void |
addExpectedTCP(int command)
Fügt ein neues TCPCommand zu den erwarteten TCPCommands hinzu. |
protected void |
clearExpectedGame()
Leert die Liste der erwarteten GameCommands. |
protected void |
clearExpectedTCP()
Leert die Liste der erwarteten TCPCommand. |
protected void |
createNewModi(int modus)
Erzeugt den neuen GameModus. |
protected void |
createNewModi(int modus,
EventHandler eventHandler)
Erzeugt den neuen GameModus. |
protected void |
distributeCommand(Command command)
Verbreitet einen Befehl über den EventHandler. |
protected ClientCommunicator |
getCommunicator()
Liefert den Communicator. |
EventHandler |
getEventHandler()
Liefert den Eventhandler. |
protected MetaServerInfo |
getServerInfo()
Liefert die Infos zum Metaserver. |
abstract int |
getType()
Liefert den Typ des Modus. |
protected void |
parseGameChatMessage(GameChatMessage command)
Verarbeitet eine Nachricht zum chatten von der Gui. |
protected void |
parseTCPChatMessage(TCPChatMessage command)
Verarbeitet eine Nachricht zum chatten vom Server. |
protected void |
sendCommand(TCPCommand command)
Sendet einen TCP Befehl an den Server. |
void |
setCommunicator(ClientCommunicator com)
Setzt den ClientCommunicator. |
void |
setEventHandler(EventHandler handler)
Setzt den Ereignisshandler, der für die Verteilung von Ereignissen zuständig ist. |
protected void |
shutdown()
Beendet den Client. |
protected boolean |
testGameCommand(GameCommand command)
Testet, ob das GameCommand verarbeitet werden soll. |
protected boolean |
testTCPCommand(TCPCommand command)
Testet, ob das TCPCommand verarbeitet werden soll. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.limdul.cassiopeia.control.TCPCommandListener |
|---|
parseTCPCommand |
| Methods inherited from interface de.limdul.cassiopeia.control.GameCommandListener |
|---|
parseGameCommand |
| Field Detail |
|---|
public static final int CONNECTING
ConnectingMeta,
Constant Field Valuespublic static final int LOBBY
Lobby,
Constant Field Valuespublic static final int OPEN_GAME
ClientOpenGame,
Constant Field Values| Constructor Detail |
|---|
public MetaServerClientModus()
| Method Detail |
|---|
public abstract int getType()
public void setCommunicator(ClientCommunicator com)
com - Der ClientCommunicator.public void setEventHandler(EventHandler handler)
CassiopeiaListener
setEventHandler in interface CassiopeiaListenerhandler - Der EreignisshandlerCassiopeiaListener.setEventHandler(de.limdul.cassiopeia.control.EventHandler)public EventHandler getEventHandler()
protected void createNewModi(int modus)
modus - Der Schlüssel des gewünschten Neuen Modus.
protected void createNewModi(int modus,
EventHandler eventHandler)
modus - Der Schlüssel des gewünschten Neuen Modus.eventHandler - Der hinzuzufügende Eventhandlerprotected final void clearExpectedGame()
protected final void clearExpectedTCP()
protected final void addExpectedTCP(int command)
command - Das erwartete TCPCommandprotected final void addExpectedGame(int command)
command - Das erwartete GameCommandprotected final boolean testGameCommand(GameCommand command)
Normal,
da es vorkommen kann, dass die GUI Befehle generiert, die veraltet sind.
command - Der Befehl
true wenn es nicht verarbeitet werden soll, false sonst.protected final boolean testTCPCommand(TCPCommand command)
Warning,
da eigentlich nur erwartete Befehle vom Server kommen sollten.
command - Der Befehl
true wenn es nicht verarbeitet werden soll, false sonst.protected final void shutdown()
protected void parseGameChatMessage(GameChatMessage command)
command - Die Nachricht.protected void parseTCPChatMessage(TCPChatMessage command)
command - Die Nachricht.protected final void sendCommand(TCPCommand command)
command - Der zu sendende TCP Befehl.protected final void distributeCommand(Command command)
command - Der zu verbreitende Befehl.protected final MetaServerInfo getServerInfo()
protected final ClientCommunicator getCommunicator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||