public final class NamingThreadFactory extends Object implements ThreadFactory
Constructor and Description |
---|
NamingThreadFactory(ThreadFactory delegate,
String name)
Creates a new naming factory.
|
public NamingThreadFactory(ThreadFactory delegate, String name)
delegate
- a baseline factory, such as Executors.defaultThreadFactory()
or DaemonThreadFactory
or ExceptionCatchingThreadFactory
name
- an identifier to be used in thread names; might be e.g. your Class.getSimpleName()
public Thread newThread(Runnable r)
newThread
in interface ThreadFactory
Copyright © 2004–2022. All rights reserved.