Class NamingThreadFactory

  • All Implemented Interfaces:
    ThreadFactory

    public class NamingThreadFactory
    extends Object
    implements ThreadFactory
    A factory that names new Threads based on constructor supplied generator/name. Each instance has an associated thread group, which newly created threads will belong to.
    • Constructor Detail

      • NamingThreadFactory

        public NamingThreadFactory​(String name)
        Constructs a factory that will create non-daemon threads with Thread.NORM_PRIORITY and names constructed using scheme <name>-thread-<sequenceNumber>. Created threads will belong to a newly created ThreadGroup named name associated with this factory.