net.sourceforge.sqlunit
Class ThreadHandlerAdapter

java.lang.Object
  extended by java.lang.Thread
      extended by net.sourceforge.sqlunit.ThreadHandlerAdapter
All Implemented Interfaces:
java.lang.Runnable

public class ThreadHandlerAdapter
extends java.lang.Thread

The ThreadHandlerAdapter class allows the running of a Handler class within a Thread. This is used to support multi-threading in the Diff Element.

Version:
$Revision: 1.7 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ThreadHandlerAdapter(org.jdom.Element element)
          Constructor using an SQLUnit Element.
 
Method Summary
 java.lang.Object getProcessingResult()
          Accessor for the results of running the process(Element) method.
 void run()
          Runs the ElementHandler.process(Element) and places the result in the processingResult object.
 
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
 

Constructor Detail

ThreadHandlerAdapter

public ThreadHandlerAdapter(org.jdom.Element element)
Constructor using an SQLUnit Element.

Parameters:
element - the Element for which the ThreadHandlerAdapter needs to be constructed.
Method Detail

run

public final void run()
Runs the ElementHandler.process(Element) and places the result in the processingResult object. If there is an error reported from the process() call, a Runtime error object is thrown which wraps the Exception object returned.

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

getProcessingResult

public final java.lang.Object getProcessingResult()
Accessor for the results of running the process(Element) method.

Returns:
the processing result.