Class LittleDrinkServer

java.lang.Object
  extended byBasicDrinkServer
      extended byLittleDrinkServer

public class LittleDrinkServer
extends BasicDrinkServer

This is the entry point for the drink server implemented on a laptop with a parallel-port interface to the slot electronics.

This class must be initialized in a certain order. For more information, see the FakeDrinkServer documentation. This initialization is needed due to a buried/circular dependancy, since the BasicDrinkServer starts some stuff we need, and we start some stuff the BasicDrinkServer needs.

Version:
$Revision: #9 $
Author:
Sean M. Graham [grahams@csh.rit.edu], Bill Kuker [kukester@csh.rit.edu], Kevin Thompson [antiduh@csh.rit.edu]
See Also:
FakeDrinkServer, TINIDrinkServer, BasicDrinkServer

Field Summary
static String defaultConfigName
          The default filename to use for the configfile.
private static DrinkMachineSpec drink
          The DrinkMachineSpec that we will instantiate and then feed to BasicDrinkServer
 
Fields inherited from class BasicDrinkServer
acct, config, configfile, log
 
Constructor Summary
LittleDrinkServer(String configFile)
          Start up the entire 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()
          A simple helper method to print the correct 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 default filename to use for the configfile.

See Also:
Constant Field Values

drink

private static DrinkMachineSpec drink
The DrinkMachineSpec that we will instantiate and then feed to BasicDrinkServer

Constructor Detail

LittleDrinkServer

public LittleDrinkServer(String configFile)
Start up the entire server. Construct then stage1-setup BasicDrinkServer, then setup the LittleDrinkMachine instance, then stage2-setup BasicDrinkServer.

Parameters:
configFile - The filename to read the config values 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()
A simple helper method to print the correct way to execute this program.