org.jboss.test.thread
Class TestThread
java.lang.Object
java.lang.Thread
org.jboss.test.thread.TestThread
- All Implemented Interfaces:
- Runnable, Thread.UncaughtExceptionHandler
public class TestThread
- extends Thread
- implements Thread.UncaughtExceptionHandler
TestThread.
A simple thread that you can doJoin()
on
and it will rethrow any error in the thread's execution as an
AssertionFailedError
- Version:
- $Revision: 1.1 $
- Author:
- Adrian Brock
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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
TestThread
public TestThread()
TestThread
public TestThread(String name)
uncaughtException
public void uncaughtException(Thread t,
Throwable e)
- Specified by:
uncaughtException
in interface Thread.UncaughtExceptionHandler
doJoin
public void doJoin()
throws InterruptedException
- Throws:
InterruptedException
doJoin
public void doJoin(long millis)
throws InterruptedException
- Throws:
InterruptedException
doJoinExpectError
public void doJoinExpectError(Class<? extends Throwable> expected)
throws InterruptedException
- Throws:
InterruptedException
doJoinExpectError
public void doJoinExpectError(long millis,
Class<? extends Throwable> expected)
throws InterruptedException
- Throws:
InterruptedException
Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.