org.apache.qpid.junit.concurrency
Class ThreadTestExample

java.lang.Object
  extended by org.apache.qpid.junit.concurrency.ThreadTestExample

public class ThreadTestExample
extends Object

An example to illustrate the use of the ThreadTestCoordinator and TestRunnables.

CRC Card
Responsibilities Collaborations
Demo multi-threaded testing.


Field Summary
(package private)  Object sharedLock
          A shared lock between the test threads.
(package private)  TestRunnable testThread1
          Test thread 1.
(package private)  TestRunnable testThread2
          Test thread 2.
 
Constructor Summary
ThreadTestExample()
           
 
Method Summary
 void main(String[] args)
          Executes the test threads with coordination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

testThread1

TestRunnable testThread1
Test thread 1.


sharedLock

final Object sharedLock
A shared lock between the test threads.


testThread2

TestRunnable testThread2
Test thread 2.

Constructor Detail

ThreadTestExample

public ThreadTestExample()
Method Detail

main

public void main(String[] args)
Executes the test threads with coordination.

Parameters:
args - Ignored.


Licensed to the Apache Software Foundation