Package javax.jmdns.impl.util
Class NamedThreadFactory
- java.lang.Object
-
- javax.jmdns.impl.util.NamedThreadFactory
-
- All Implemented Interfaces:
ThreadFactory
public class NamedThreadFactory extends Object implements ThreadFactory
Custom thread factory which sets the name to make it easier to identify where the pooled threads were created.- Author:
- Trejkaz, Pierre Frisch
-
-
Constructor Summary
Constructors Constructor Description NamedThreadFactory(String namePrefix)
Constructs the thread factory.
-
-
-
Constructor Detail
-
NamedThreadFactory
public NamedThreadFactory(String namePrefix)
Constructs the thread factory.- Parameters:
namePrefix
- a prefix to append to thread names (will be separated from the default thread name by a space.)
-
-
Method Detail
-
newThread
public Thread newThread(Runnable runnable)
- Specified by:
newThread
in interfaceThreadFactory
-
-