Class FakeDrinkServer

java.lang.Object
  extended byBasicDrinkServer
      extended byFakeDrinkServer

public class FakeDrinkServer
extends BasicDrinkServer

This is a simple wrapper that spawns DrinkMachineSpec, AcctMgrSpec, SundayServer, FingerServer, ClientServer and TestButtonClient for purposes of testing the drink software, and for demonstration purposes.

##INITIALIZATION PROCEDURE##:
Please remember that BasicDrinkServer handles almost all of the initialization, including the config, logger, account manager, and all of the services. HOWEVER, the FakeDrinkMachine has to be constructed by this class immediately after the Config and Log.

THEREFORE, this class will:
1) Construct the super.
2) Call 'super.stage1();'
3) Construct the DrinkMachineSpec implementation (FakeDrinkMachine).
4) Call 'super.stage2();'

Version:
$Revision: #18 $
Author:
Kevin Thompson [antiduh@csh.rit.edu], Sean M. Graham [grahams@csh.rit.edu]
See Also:
LittleDrinkServer, TINIDrinkServer, BasicDrinkServer

Field Summary
static String defaultConfigName
          The name of the file that stores all the configuration data.
private  DrinkMachineSpec drink
          The DrinkMachineSpec that we create (which is FakeDrinkMachine) and supply to the rest of the program.
 
Fields inherited from class BasicDrinkServer
acct, config, configfile, log
 
Constructor Summary
FakeDrinkServer(String configFile)
          Starts the server.
 
Method Summary
static void main(String[] args)
          The class needs to be instantiated so that it can properly use BasicDrinkServer.
private static void printUsage()
          Helper method to print the proper way to execute this program.
 
Methods inherited from class BasicDrinkServer
stage1, stage2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultConfigName

public static final String defaultConfigName
The name of the file that stores all the configuration data.

See Also:
Constant Field Values

drink

private DrinkMachineSpec drink
The DrinkMachineSpec that we create (which is FakeDrinkMachine) and supply to the rest of the program.

Constructor Detail

FakeDrinkServer

public FakeDrinkServer(String configFile)
Starts the server.

Parameters:
configFile - The filename to read the config from.
Method Detail

main

public static void main(String[] args)
The class needs to be instantiated so that it can properly use BasicDrinkServer.


printUsage

private static void printUsage()
Helper method to print the proper way to execute this program.