Improved build.xml
[vimdoclet.git] / sample / java.util.concurrent.ThreadFactory.txt
blob6c69f8e1e86a4fb34bfbbff112d359a64d5a7aea
1 *java.util.concurrent.ThreadFactory* *ThreadFactory* An object that creates new 
3 public interface interface ThreadFactory
6 |java.util.concurrent.ThreadFactory_Description|
7 |java.util.concurrent.ThreadFactory_Fields|
8 |java.util.concurrent.ThreadFactory_Constructors|
9 |java.util.concurrent.ThreadFactory_Methods|
11 ================================================================================
13 *java.util.concurrent.ThreadFactory_Methods*
14 |java.util.concurrent.ThreadFactory.newThread(Runnable)|Constructs a new Thread
16 *java.util.concurrent.ThreadFactory_Description*
18 An object that creates new threads on demand. Using thread factories removes 
19 hardwiring of calls to new Thread(|java.lang.Thread|) , enabling applications 
20 to use special thread subclasses, priorities, etc. 
22 The simplest implementation of this interface is just: 
24 class SimpleThreadFactory implements ThreadFactory { public Thread 
25 newThread(Runnable r) { return new Thread(r); } } 
27 The (|java.util.concurrent.Executors|) method provides a more useful simple 
28 implementation, that sets the created thread context to known values before 
29 returning it. 
32 *java.util.concurrent.ThreadFactory.newThread(Runnable)*
34 public |java.lang.Thread| newThread(java.lang.Runnable r)
36 Constructs a new Thread. Implementations may also initialize priority, name, 
37 daemon status, ThreadGroup, etc. 
39     r - a runnable to be executed by new thread instance 
41     Returns: constructed thread