edu.cuny.cat.server
Class AutoClockController

java.lang.Object
  extended by edu.cuny.cat.server.ClockController
      extended by edu.cuny.cat.server.AutoClockController
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable

public class AutoClockController
extends ClockController
implements edu.cuny.config.param.Parameterizable

A class controls the game clock by automatically starting it and quitting the game both after a specified amount of time.

Parameters

base.startdelay
long
(the number of milliseconds to wait before starting the game clock.)
base.exitdelay
long
(the number of milliseconds to wait before quiting the game after the clock stops.)

Version:
$Revision: 1.5 $
Author:
Jinzhong Niu
See Also:
SilentConsole

Field Summary
protected  int exitDelay
           
static java.lang.String P_EXITDELAY
           
static java.lang.String P_STARTDELAY
           
protected  int startDelay
           
protected  java.util.Timer timer
           
 
Fields inherited from class edu.cuny.cat.server.ClockController
P_DEF_BASE
 
Constructor Summary
AutoClockController()
           
 
Method Summary
 void eventOccurred(AuctionEvent event)
           
 java.lang.String getString()
           
 void setup(edu.cuny.config.param.ParameterDatabase parameters, edu.cuny.config.param.Parameter base)
           
 void start()
          starts the game clock, or asks an external source to decide when to start.
 void stop()
          stops the game clock.
 
Methods inherited from class edu.cuny.cat.server.ClockController
pauseClock, quitGame, resumeClock, startClock, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

P_STARTDELAY

public static java.lang.String P_STARTDELAY

P_EXITDELAY

public static java.lang.String P_EXITDELAY

timer

protected java.util.Timer timer

startDelay

protected int startDelay

exitDelay

protected int exitDelay
Constructor Detail

AutoClockController

public AutoClockController()
Method Detail

setup

public void setup(edu.cuny.config.param.ParameterDatabase parameters,
                  edu.cuny.config.param.Parameter base)
Specified by:
setup in interface edu.cuny.config.param.Parameterizable

eventOccurred

public void eventOccurred(AuctionEvent event)
Specified by:
eventOccurred in interface AuctionEventListener
Overrides:
eventOccurred in class ClockController

start

public void start()
Description copied from class: ClockController
starts the game clock, or asks an external source to decide when to start.

Overrides:
start in class ClockController

stop

public void stop()
Description copied from class: ClockController
stops the game clock. When this method will be called is up to the child class that extends this class.

Overrides:
stop in class ClockController

getString

public java.lang.String getString()