edu.sdsc.inca
Class ConsumerTest.MockDepot

java.lang.Object
  extended by java.lang.Thread
      extended by edu.sdsc.inca.ConsumerTest.MockDepot
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ConsumerTest

public static class ConsumerTest.MockDepot
extends java.lang.Thread

Functionality of mock depot server. Recognizes GETSUITE and PING.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 boolean isReady
           
 int statusHistoryDelay
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ConsumerTest.MockDepot(int numConnections, int port)
          Create a new mock depot.
 
Method Summary
 void addSuite(java.lang.String name, java.lang.String[] xml, int retTime)
          Add a suite to the mock depot.
 void deleteSuite(java.lang.String name)
          Remove a suite to the mock depot.
 void run()
          Functionality of mock depot server.
 
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

isReady

public boolean isReady

statusHistoryDelay

public int statusHistoryDelay
Constructor Detail

ConsumerTest.MockDepot

public ConsumerTest.MockDepot(int numConnections,
                              int port)
Create a new mock depot.

Parameters:
numConnections - The number of connections we expect to receive.
port - The port to start the mock depot on.
Method Detail

addSuite

public void addSuite(java.lang.String name,
                     java.lang.String[] xml,
                     int retTime)
Add a suite to the mock depot. This will get echoed back to a client when they query for suites.

Parameters:
name - The name of the suite
xml - An array of results to use as the suite contents
retTime - How long to wait before returning the results.

deleteSuite

public void deleteSuite(java.lang.String name)
Remove a suite to the mock depot.

Parameters:
name - The name of the suite to delete

run

public void run()
Functionality of mock depot server. Recognizes GETCONFIG and PING.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread