Class DaemonThread

  • All Implemented Interfaces:
    java.lang.Runnable

    public class DaemonThread
    extends java.lang.Thread
    A daemon thread is a minor thread that does not prevent the JVM from exiting. This is a convenience class to make it easier to use daemon threads in a program. The following code blocks are effectively equivalent:
    
       Thread thread = new Thread(...);
       thread.setDaemon(true);
     
    
       Thread thread = new DaemonThread(...);
     
    See Also:
    Thread.setDaemon
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      DaemonThread()  
      DaemonThread​(java.lang.Runnable target)  
      DaemonThread​(java.lang.Runnable target, java.lang.String name)  
      DaemonThread​(java.lang.String name)  
      DaemonThread​(java.lang.ThreadGroup group, java.lang.Runnable target)  
      DaemonThread​(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name)  
      DaemonThread​(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name, long stackSize)  
      DaemonThread​(java.lang.ThreadGroup group, java.lang.String name)  
    • Method Summary

      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

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

      • DaemonThread

        public DaemonThread()
      • DaemonThread

        public DaemonThread​(java.lang.Runnable target)
      • DaemonThread

        public DaemonThread​(java.lang.ThreadGroup group,
                            java.lang.Runnable target)
      • DaemonThread

        public DaemonThread​(java.lang.String name)
      • DaemonThread

        public DaemonThread​(java.lang.ThreadGroup group,
                            java.lang.String name)
      • DaemonThread

        public DaemonThread​(java.lang.Runnable target,
                            java.lang.String name)
      • DaemonThread

        public DaemonThread​(java.lang.ThreadGroup group,
                            java.lang.Runnable target,
                            java.lang.String name)
      • DaemonThread

        public DaemonThread​(java.lang.ThreadGroup group,
                            java.lang.Runnable target,
                            java.lang.String name,
                            long stackSize)