|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
edu.cuny.cat.server.GameController
public final class GameController
A class used at GameServer
as a control hub,
initializing various components, event passing, etc.
The game console and clock controller configured should match to support different ways of running cat games.
cat.server.console = edu.cuny.cat.ui.GuiConsole cat.server.clockcontroller = edu.cuny.cat.server.EventBasedClockController
cat.server.console = edu.cuny.cat.server.TelnetConsole cat.server.clockcontroller = edu.cuny.cat.server.EventBasedClockController
cat.server.console = edu.cuny.cat.ui.SilentConsolePlus
cat.server.clockcontroller = edu.cuny.cat.server.AutoClockControllerfor asynchronous communication mode, or
cat.server.clockcontroller = edu.cuny.cat.server.SynchronousClockControllerfor synchronous communication mode.
Parameters
base.registry class, implementing Registry
|
(the type of registry facility to restore game activities for run-time access) |
base.console class, implementing Console |
(the console for user to control the game) |
base.clockcontroller class, implementing ClockController
|
(the way to control the game clock, including how to start and stop the clock) |
base.report class, implementing GameReport
|
(the type of report facility to log game activities) |
base.gc boolean ( false by default) |
(whether running garbage collector following
DayClosedEvent ) |
base.logging boolean ( true by default) |
(whether to allow log globally, used by some reports only) |
Field Summary | |
---|---|
protected ClientBehaviorController |
behaviorController
|
protected ChargeValidator |
chargeValidator
|
protected GameClock |
clock
|
protected ClockController |
clockController
|
protected ConnectionManager |
connManager
|
protected Console |
console
|
protected boolean |
dailyGC
|
protected ClientIdentityController |
identityController
|
protected static GameController |
instance
|
static java.lang.String |
P_CONSOLE
|
static java.lang.String |
P_GC
|
static java.lang.String |
P_LOGGING
|
static java.lang.String |
P_REGISTRY
|
static java.lang.String |
P_REPORT
|
protected Registry |
registry
|
protected GameReport |
report
|
protected SecurityManager |
securityManager
|
protected ShoutValidator |
shoutValidator
|
protected boolean |
showWinnerList
|
protected TimeoutController |
timeoutController
|
protected TransactionValidator |
transactionValidator
|
protected ValuerFactory |
valuerFactory
|
Constructor Summary | |
---|---|
GameController()
|
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String P_REGISTRY
public static final java.lang.String P_CONSOLE
public static final java.lang.String P_REPORT
public static final java.lang.String P_LOGGING
public static final java.lang.String P_GC
protected ConnectionManager connManager
protected TimeoutController timeoutController
protected Registry registry
protected static GameController instance
protected GameClock clock
protected ClockController clockController
protected ShoutValidator shoutValidator
protected TransactionValidator transactionValidator
protected ChargeValidator chargeValidator
protected Console console
protected ValuerFactory valuerFactory
protected boolean showWinnerList
protected GameReport report
protected ClientIdentityController identityController
protected ClientBehaviorController behaviorController
protected SecurityManager securityManager
protected boolean dailyGC
Constructor Detail |
---|
public GameController()
Method Detail |
---|
public static GameController getInstance()
public void setup(edu.cuny.config.param.ParameterDatabase parameters, edu.cuny.config.param.Parameter base)
setup
in interface edu.cuny.config.param.Parameterizable
public void initialize()
public void start()
public void stop()
public void dispose()
public void exit()
public GameClock getClock()
public ClockController getClockController()
public ShoutValidator getShoutValidator()
public TransactionValidator getTransactionValidator()
public ChargeValidator getChargeValidator()
public ConnectionManager getConnectionManager()
public TimeoutController getTimeController()
public ClientBehaviorController getBehaviorController()
public SecurityManager getSecurityManager()
public Registry getRegistry()
public Console getConsole()
public ValuerFactory getValuerFactory()
public GameReport getReport()
public <R extends GameReport> R getReport(java.lang.Class<R> reportClass)
public void addReport(GameReport newReport)
public void processEventInsideServer(AuctionEvent event)
event
- protected void notifyInsideListener(AuctionEventListener listener, AuctionEvent event)
listener
- event
- public void eventOccurred(AuctionEvent event)
eventOccurred
in interface AuctionEventListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |