soc.robot
Class SOCRobotPinger

java.lang.Object
  extended by java.lang.Thread
      extended by soc.robot.SOCRobotPinger
All Implemented Interfaces:
java.lang.Runnable

public class SOCRobotPinger
extends java.lang.Thread

Pings the robots so that they can have a sense of time

Author:
Robert S Thomas

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  boolean alive
           
(package private)  CappedQueue<SOCMessage> messageQueue
           
(package private)  SOCTimingPing ping
           
(package private)  java.lang.String robotNickname
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SOCRobotPinger(CappedQueue<SOCMessage> q, java.lang.String gameName, java.lang.String nickname)
          Create a robot pinger
 
Method Summary
 void run()
          DOCUMENT ME!
 void stopPinger()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

messageQueue

CappedQueue<SOCMessage> messageQueue

ping

SOCTimingPing ping

alive

boolean alive

robotNickname

java.lang.String robotNickname
Constructor Detail

SOCRobotPinger

public SOCRobotPinger(CappedQueue<SOCMessage> q,
                      java.lang.String gameName,
                      java.lang.String nickname)
Create a robot pinger

Parameters:
q - the robot brain's message queue
nickname - the robot's nickname, for debug thread naming
Method Detail

run

public void run()
DOCUMENT ME!

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

stopPinger

public void stopPinger()
DOCUMENT ME!