gecco.communication.client
Class DataOutputExchangeHandler
java.lang.Object
|
+--gecco.communication.client.DataOutputExchangeHandler
- All Implemented Interfaces:
- Runnable
- public class DataOutputExchangeHandler
- extends Object
- implements Runnable
A class that sends messages to the server
- Author:
- Niklas Hallenfur, Karl Hasselström, Henrik Hägerström, Jon Åslund
Method Summary |
void |
addMessageToQueue(Message message)
Used by the ServerAmbassador to add messages to send |
void |
kill()
called whenever someone wants this thread to die |
void |
run()
Main processing method for the DataOutputExchangeHandler object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataOutputExchangeHandler
public DataOutputExchangeHandler(MessageQueue q,
ServerConnection sc,
ServerAmbassador sa)
- Parameters:
q
- the queue that will contain the messages to sendsc
- the connection to send messages tosa
- the serverambassador who created this object
addMessageToQueue
public void addMessageToQueue(Message message)
- Used by the ServerAmbassador to add messages to send
- Parameters:
message
- The feature to be added to the MessageToQueue attribute
run
public void run()
- Main processing method for the DataOutputExchangeHandler object
- Specified by:
run
in interface Runnable
kill
public void kill()
- called whenever someone wants this thread to die