Java™ Platform
Standard Ed. 6

Uses of Class
java.lang.Thread

Packages that use Thread
java.lang Provides classes that are fundamental to the design of the Java programming language. 
java.util.concurrent Utility classes commonly useful in concurrent programming. 
java.util.concurrent.locks Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors. 
javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components. 
 

Uses of Thread in java.lang
 

Methods in java.lang that return Thread
static Thread Thread.currentThread()
          Returns a reference to the currently executing thread object.
 

Methods in java.lang that return types with arguments of type Thread
static Map<Thread,StackTraceElement[]> Thread.getAllStackTraces()
          Returns a map of stack traces for all live threads.
 

Methods in java.lang with parameters of type Thread
 void Runtime.addShutdownHook(Thread hook)
          Registers a new virtual-machine shutdown hook.
 void SecurityManager.checkAccess(Thread t)
          Throws a SecurityException if the calling thread is not allowed to modify the thread argument.
static int Thread.enumerate(Thread[] tarray)
          Copies into the specified array every active thread in the current thread's thread group and its subgroups.
 int ThreadGroup.enumerate(Thread[] list)
          Copies into the specified array every active thread in this thread group and its subgroups.
 int ThreadGroup.enumerate(Thread[] list, boolean recurse)
          Copies into the specified array every active thread in this thread group.
 boolean Runtime.removeShutdownHook(Thread hook)
          De-registers a previously-registered virtual-machine shutdown hook.
 void Thread.UncaughtExceptionHandler.uncaughtException(Thread t, Throwable e)
          Method invoked when the given thread terminates due to the given uncaught exception.
 void ThreadGroup.uncaughtException(Thread t, Throwable e)
          Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception, and the thread does not have a specific Thread.UncaughtExceptionHandler installed.
 

Uses of Thread in java.util.concurrent
 

Methods in java.util.concurrent that return Thread
 Thread ThreadFactory.newThread(Runnable r)
          Constructs a new Thread.
 

Methods in java.util.concurrent that return types with arguments of type Thread
protected  Collection<Thread> Semaphore.getQueuedThreads()
          Returns a collection containing threads that may be waiting to acquire.
 

Methods in java.util.concurrent with parameters of type Thread
protected  void ThreadPoolExecutor.beforeExecute(Thread t, Runnable r)
          Method invoked prior to executing the given Runnable in the given thread.
 void TimeUnit.timedJoin(Thread thread, long timeout)
          Performs a timed Thread.join using this time unit.
 

Uses of Thread in java.util.concurrent.locks
 

Methods in java.util.concurrent.locks that return Thread
protected  Thread AbstractOwnableSynchronizer.getExclusiveOwnerThread()
          Returns the thread last set by setExclusiveOwnerThread, or null if never set.
 Thread AbstractQueuedLongSynchronizer.getFirstQueuedThread()
          Returns the first (longest-waiting) thread in the queue, or null if no threads are currently queued.
 Thread AbstractQueuedSynchronizer.getFirstQueuedThread()
          Returns the first (longest-waiting) thread in the queue, or null if no threads are currently queued.
protected  Thread ReentrantReadWriteLock.getOwner()
          Returns the thread that currently owns the write lock, or null if not owned.
protected  Thread ReentrantLock.getOwner()
          Returns the thread that currently owns this lock, or null if not owned.
 

Methods in java.util.concurrent.locks that return types with arguments of type Thread
 Collection<Thread> AbstractQueuedLongSynchronizer.getExclusiveQueuedThreads()
          Returns a collection containing threads that may be waiting to acquire in exclusive mode.
 Collection<Thread> AbstractQueuedSynchronizer.getExclusiveQueuedThreads()
          Returns a collection containing threads that may be waiting to acquire in exclusive mode.
protected  Collection<Thread> ReentrantReadWriteLock.getQueuedReaderThreads()
          Returns a collection containing threads that may be waiting to acquire the read lock.
protected  Collection<Thread> ReentrantReadWriteLock.getQueuedThreads()
          Returns a collection containing threads that may be waiting to acquire either the read or write lock.
 Collection<Thread> AbstractQueuedLongSynchronizer.getQueuedThreads()
          Returns a collection containing threads that may be waiting to acquire.
 Collection<Thread> AbstractQueuedSynchronizer.getQueuedThreads()
          Returns a collection containing threads that may be waiting to acquire.
protected  Collection<Thread> ReentrantLock.getQueuedThreads()
          Returns a collection containing threads that may be waiting to acquire this lock.
protected  Collection<Thread> ReentrantReadWriteLock.getQueuedWriterThreads()
          Returns a collection containing threads that may be waiting to acquire the write lock.
 Collection<Thread> AbstractQueuedLongSynchronizer.getSharedQueuedThreads()
          Returns a collection containing threads that may be waiting to acquire in shared mode.
 Collection<Thread> AbstractQueuedSynchronizer.getSharedQueuedThreads()
          Returns a collection containing threads that may be waiting to acquire in shared mode.
protected  Collection<Thread> AbstractQueuedLongSynchronizer.ConditionObject.getWaitingThreads()
          Returns a collection containing those threads that may be waiting on this Condition.
protected  Collection<Thread> AbstractQueuedSynchronizer.ConditionObject.getWaitingThreads()
          Returns a collection containing those threads that may be waiting on this Condition.
 Collection<Thread> AbstractQueuedLongSynchronizer.getWaitingThreads(AbstractQueuedLongSynchronizer.ConditionObject condition)
          Returns a collection containing those threads that may be waiting on the given condition associated with this synchronizer.
 Collection<Thread> AbstractQueuedSynchronizer.getWaitingThreads(AbstractQueuedSynchronizer.ConditionObject condition)
          Returns a collection containing those threads that may be waiting on the given condition associated with this synchronizer.
protected  Collection<Thread> ReentrantReadWriteLock.getWaitingThreads(Condition condition)
          Returns a collection containing those threads that may be waiting on the given condition associated with the write lock.
protected  Collection<Thread> ReentrantLock.getWaitingThreads(Condition condition)
          Returns a collection containing those threads that may be waiting on the given condition associated with this lock.
 

Methods in java.util.concurrent.locks with parameters of type Thread
static Object LockSupport.getBlocker(Thread t)
          Returns the blocker object supplied to the most recent invocation of a park method that has not yet unblocked, or null if not blocked.
 boolean ReentrantReadWriteLock.hasQueuedThread(Thread thread)
          Queries whether the given thread is waiting to acquire either the read or write lock.
 boolean ReentrantLock.hasQueuedThread(Thread thread)
          Queries whether the given thread is waiting to acquire this lock.
 boolean AbstractQueuedLongSynchronizer.isQueued(Thread thread)
          Returns true if the given thread is currently queued.
 boolean AbstractQueuedSynchronizer.isQueued(Thread thread)
          Returns true if the given thread is currently queued.
protected  void AbstractOwnableSynchronizer.setExclusiveOwnerThread(Thread t)
          Sets the thread that currently owns exclusive access.
static void LockSupport.unpark(Thread thread)
          Makes available the permit for the given thread, if it was not already available.
 

Uses of Thread in javax.swing.text
 

Methods in javax.swing.text that return Thread
protected  Thread AbstractDocument.getCurrentWriter()
          Fetches the current writing thread if there is one.
 


Java™ Platform
Standard Ed. 6

Submit a bug or feature
For further API reference and developer documentation, see Java SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.