next up previous contents
Next: Server Up: Client Previous: Server Connection   Contents

Listening Thread

This is the main thread except for the Event Thread (the Event Thread is the only thread where Swing Events take place).

The Listening Thread, as it's name suggests, Listens on the Connection object for incoming messages from the CSICQ server. Each message received is first identified for it's type, then an action is taken. The actions taken by this thread are usually considered with the GUI elements of the applet.

The following Event messages are currently dealt with in the listening thread:

Since the GUI elements of the Applet are manipulated in the Event Thread and can happen at the same time, some kind of synchronization method is being used.

The method of synchronization implemented is using the SwingUtilities Invoke Later method. This method simply schedules a runnable object for later execution on the Event Thread, thus all GUI changes are performed in one thread with no hazards.

Figure 1: A screen-shot of the applet
\begin{figure}\begin{center}
\makebox{\epsfxsize =140mm}
\epsfbox{csicq.eps} \end{center} \end{figure}


next up previous contents
Next: Server Up: Client Previous: Server Connection   Contents
Zvika Brakerski 2001-05-09