public class NamedDaemonThreadFactory extends Object implements ThreadFactory
Thread.setDaemon(boolean),
Thread.setName(String)| Constructor and Description |
|---|
NamedDaemonThreadFactory(String prefix)
Creates a new thread factory that will name its threads <prefix>-<n>, where
<prefix> is the given
prefix and <n> is the count of threads
created thus far by this class. |
NamedDaemonThreadFactory(String prefix,
ClassLoader contextClassLoader)
Creates a new thread factory that will name its threads <prefix>-<n>, where
<prefix> is the given
prefix and <n> is the count of threads
created thus far by this class. |
NamedDaemonThreadFactory(String prefix,
ClassLoader contextClassLoader,
Thread.UncaughtExceptionHandler uncaughtExceptionHandler,
boolean daemon) |
public NamedDaemonThreadFactory(String prefix)
prefix and <n> is the count of threads
created thus far by this class.prefix - The thread name prefixpublic NamedDaemonThreadFactory(String prefix, ClassLoader contextClassLoader)
prefix and <n> is the count of threads
created thus far by this class. If the contextClassLoader parameter is not null it will assign it to the forged
Threadprefix - The thread name prefixcontextClassLoader - An optional classLoader to assign to threadpublic NamedDaemonThreadFactory(String prefix, ClassLoader contextClassLoader, Thread.UncaughtExceptionHandler uncaughtExceptionHandler, boolean daemon)
public Thread newThread(Runnable runnable)
newThread in interface ThreadFactoryCopyright © 2016. All rights reserved.