KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > EDU > oswego > cs > dl > util > concurrent > ThreadFactory


1 /*
2   File: ThreadFactory.java
3
4   Originally written by Doug Lea and released into the public domain.
5   This may be used for any purposes whatsoever without acknowledgment.
6   Thanks for the assistance and support of Sun Microsystems Labs,
7   and everyone contributing, testing, and using this code.
8
9   History:
10   Date Who What
11   30Jun1998 dl Create public version
12 */

13
14 package EDU.oswego.cs.dl.util.concurrent;
15
16 /**
17  * Interface describing any class that can generate
18  * new Thread objects. Using ThreadFactories removes
19  * hardwiring of calls to <code>new Thread</code>, enabling
20  * applications to use special thread subclasses, default
21  * prioritization settings, etc.
22  * <p>
23  * [<a HREF="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html"> Introduction to this package. </a>] <p>
24  **/

25
26 public interface ThreadFactory {
27   /**
28    * Create a new thread that will run the given command when started
29    **/

30   public Thread JavaDoc newThread(Runnable JavaDoc command);
31 }
32
Popular Tags