soc.server
Class SOCGameTimeoutChecker

java.lang.Object
  extended by java.lang.Thread
      extended by soc.server.SOCGameTimeoutChecker
All Implemented Interfaces:
java.lang.Runnable

public class SOCGameTimeoutChecker
extends java.lang.Thread

Wakes up every few seconds to check for turns that have expired by calling SOCServer.checkForExpiredTurns(long), and every 5 minutes to check for games that have expired with SOCServer.checkForExpiredGames(long).

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
private  boolean alive
           
private  SOCServer server
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SOCGameTimeoutChecker(SOCServer srv)
          Create a game timeout checker
 
Method Summary
 void run()
          Wakes up every few seconds to check for turns that have expired, and every 5 minutes to check for games that have expired.
 void stopChecking()
          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

server

private SOCServer server

alive

private boolean alive
Constructor Detail

SOCGameTimeoutChecker

public SOCGameTimeoutChecker(SOCServer srv)
Create a game timeout checker

Parameters:
srv - the game server
Method Detail

run

public void run()
Wakes up every few seconds to check for turns that have expired, and every 5 minutes to check for games that have expired. See class javadoc.

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

stopChecking

public void stopChecking()
DOCUMENT ME!