net.sf.farrago.test
Class FarragoObjectCacheTest.CustomerThread

java.lang.Object
  extended by java.lang.Thread
      extended by net.sf.farrago.test.FarragoObjectCacheTest.CustomerThread
All Implemented Interfaces:
Runnable
Enclosing class:
FarragoObjectCacheTest

private class FarragoObjectCacheTest.CustomerThread
extends Thread

CustomerThread exemplifies a thread which uses objects from the cache.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  List<String> carDescriptions
           
private  boolean quit
           
private  boolean sawSmokingVehicle
           
private  boolean success
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FarragoObjectCacheTest.CustomerThread(List<String> carDescriptions)
          Creates a new customer thread.
 
Method Summary
 void assertSuccessful()
           
 void quit()
          Tells the customer to buzz off.
 void run()
           
private  void useCar(FarragoObjectCacheTest.RentalCarAgreement rca, String description)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

success

private boolean success

quit

private boolean quit

sawSmokingVehicle

private boolean sawSmokingVehicle

carDescriptions

private List<String> carDescriptions
Constructor Detail

FarragoObjectCacheTest.CustomerThread

public FarragoObjectCacheTest.CustomerThread(List<String> carDescriptions)
Creates a new customer thread.

Parameters:
carDescriptions - list of car descriptions the customer should rent, one after another
Method Detail

quit

public void quit()
Tells the customer to buzz off.


assertSuccessful

public void assertSuccessful()

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

useCar

private void useCar(FarragoObjectCacheTest.RentalCarAgreement rca,
                    String description)