net.bluebones.boggle
Class ConnectionMonitor

java.lang.Object
  extended by net.bluebones.boggle.ConnectionMonitor
All Implemented Interfaces:
Runnable

public class ConnectionMonitor
extends Object
implements Runnable

Thread that checks connection status every ten seconds and updates the ConnectionPanel to reflect current status.

Version:
0.3 $Revision: 1.3 $
Author:
Thomas David Baker
See Also:
ConnectionPanel

Constructor Summary
ConnectionMonitor(HumanPlayer player)
          Initialises a new ConnectionMonitor.
 
Method Summary
 void run()
          Main action of the ConnectionMonitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionMonitor

public ConnectionMonitor(HumanPlayer player)
Initialises a new ConnectionMonitor.

Parameters:
player - Player this connection checker belongs to.
Method Detail

run

public void run()
Main action of the ConnectionMonitor. Checks connection every second, reporting changes to the ConnectionPanel. Checks any clients this Player may have and removes them from the Player's list if they are no longer connected. If this player is a client then checks connection to server and reports errors if not connected.

Specified by:
run in interface Runnable