Class DaemonThreadFactory

  • All Implemented Interfaces:
    java.util.concurrent.ThreadFactory

    public final class DaemonThreadFactory
    extends java.lang.Object
    implements java.util.concurrent.ThreadFactory
    A ThreadFactory implementation that starts all Thread as daemons.
    • Constructor Summary

      Constructors 
      Constructor Description
      DaemonThreadFactory​(java.lang.String threadName)
      Constructs a new DaemonThreadFactory with a null ContextClassLoader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Thread newThread​(java.lang.Runnable r)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DaemonThreadFactory

        public DaemonThreadFactory​(java.lang.String threadName)
        Constructs a new DaemonThreadFactory with a null ContextClassLoader.
        Parameters:
        threadName - used to prefix all thread names.
    • Method Detail

      • newThread

        public java.lang.Thread newThread​(java.lang.Runnable r)
        Specified by:
        newThread in interface java.util.concurrent.ThreadFactory