|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gecco.communication.client.DataInputExchangeHandler
A class that listens for incoming messages from the server, and tells the client about them.
| Field Summary | |
private Client |
client
Description of the Field |
private ServerConnection |
connection
Description of the Field |
private DataOutputExchangeHandler |
DEHOutput
Description of the Field |
private boolean |
die
Description of the Field |
private ServerAmbassador |
i_am_working_for
Description of the Field |
| Constructor Summary | |
DataInputExchangeHandler(ServerConnection sc,
Client cl,
ServerAmbassador sa,
DataOutputExchangeHandler DEHOutput)
|
|
| Method Summary | |
private void |
getActionBlocked()
an action is no longer valid for a certain unit, get which action and which unit |
private void |
getActionCompleted()
Gets the handle of an action that has been completed |
private void |
getActionFailed()
Gets the handle and an error message for an action that failed |
private int |
getInt(byte[] byteArray,
int index)
A helper function that makes unsigned casting from byte to int |
private void |
getMapPointInvisible()
get which map point is no longer visible. |
private void |
getMapPointsInvisible()
gets an array of Points that are no longer visible |
private void |
getMapUpdate()
get an update of a map point. |
private void |
getMapUpdates()
Gets an array of positions and new colors for mappoints. |
private void |
getUnitDeleted()
gets which unit has been deleted (not necessarily destroyed) |
private void |
getUnitDestroyed()
a unit has been destroyed, get which one |
private void |
getUnitMessage()
gets a message about a certain unit |
private void |
getUnitPositionUpdate()
Get a message from the server that updates the position of a unit |
private void |
getUnitPropertyUpdate()
Get a message from the server that updates the properties of a unit |
private void |
getUnitVisible()
Get a message that a new unit is visible to the client, gets the unit's properties and action, type, etc. |
void |
kill()
called whenever someone wants this thread to die |
private void |
receiveMessage(int leadingInteger)
Called when there are messages to receive from the server. |
void |
run()
Main processing method for the DataInputExchangeHandler object |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private ServerConnection connection
private Client client
private ServerAmbassador i_am_working_for
private boolean die
private DataOutputExchangeHandler DEHOutput
| Constructor Detail |
public DataInputExchangeHandler(ServerConnection sc,
Client cl,
ServerAmbassador sa,
DataOutputExchangeHandler DEHOutput)
sc - connection to server containing the stream to write tocl - the Client to send incoming messages tosa - the ServerAmbassador this thread is working for
DEHOutput the object to send PingReplyMessage:s toDEHOutput - Description of Parameter| Method Detail |
public void run()
run in interface Runnablepublic void kill()
private void getUnitPositionUpdate()
throws Exception
Exception - Description of Exception
private void getUnitPropertyUpdate()
throws Exception
Exception - Description of Exception
private void getUnitVisible()
throws Exception
Exception - Description of Exception
private void getMapUpdate()
throws Exception
Exception - Description of Exception
private void getActionBlocked()
throws Exception
Exception - Description of Exception
private void getUnitDeleted()
throws Exception
Exception - Description of Exception
private void getUnitMessage()
throws Exception
Exception - Description of Exception
private void getUnitDestroyed()
throws Exception
Exception - Description of Exception
private void getMapPointInvisible()
throws Exception
Exception - Description of Exception
private void getMapPointsInvisible()
throws Exception
Exception - Description of Exception
private int getInt(byte[] byteArray,
int index)
byteArray - Description of Parameterindex - Description of Parameter
private void getMapUpdates()
throws Exception
Exception - Description of Exception
private void getActionCompleted()
throws Exception
Exception - Description of Exception
private void getActionFailed()
throws Exception
Exception - Description of Exception
private void receiveMessage(int leadingInteger)
throws Exception
leadingInteger - Description of ParameterException - Description of Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||