edu.cuny.cat.server
Class EventBasedClockController

java.lang.Object
  extended by edu.cuny.cat.server.ClockController
      extended by edu.cuny.cat.server.EventBasedClockController
All Implemented Interfaces:
AuctionEventListener, edu.cuny.event.RichEventListener, java.util.EventListener

public class EventBasedClockController
extends ClockController
implements edu.cuny.event.RichEventListener

A clock controller that controls the clock based upon RichEvents sent from an external source. It enables a human user to control the simulation through a graphical or command line interface.

Version:
$Revision: 1.4 $
Author:
Jinzhong Niu
See Also:
GuiConsole, TelnetConsole

Field Summary
static java.lang.String PAUSE
           
static java.lang.String QUIT
           
static java.lang.String RESUME
           
static java.lang.String START
           
 
Fields inherited from class edu.cuny.cat.server.ClockController
P_DEF_BASE
 
Constructor Summary
EventBasedClockController()
           
 
Method Summary
 void eventOccurred(edu.cuny.event.RichEvent te)
           
 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
eventOccurred, pauseClock, quitGame, resumeClock, startClock, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START

public static java.lang.String START

PAUSE

public static java.lang.String PAUSE

RESUME

public static java.lang.String RESUME

QUIT

public static java.lang.String QUIT
Constructor Detail

EventBasedClockController

public EventBasedClockController()
Method Detail

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

eventOccurred

public void eventOccurred(edu.cuny.event.RichEvent te)
Specified by:
eventOccurred in interface edu.cuny.event.RichEventListener