Class WakeupManager.ThreadDesc

java.lang.Object
com.sun.jini.thread.WakeupManager.ThreadDesc
Enclosing class:
WakeupManager

public static class WakeupManager.ThreadDesc extends Object
Description of a future thread.
See Also:
  • Constructor Details

    • ThreadDesc

      public ThreadDesc()
      Equivalent to
           ThreadDesc(null, false)
       
    • ThreadDesc

      public ThreadDesc(ThreadGroup group, boolean daemon)
      Equivalent to
           ThreadDesc(group, deamon, Thread.NORM_PRIORITY)
       
    • ThreadDesc

      public ThreadDesc(ThreadGroup group, boolean daemon, int priority)
      Describe a future thread that will be created in the given group, deamon status, and priority.
      Parameters:
      group - The group to be created in. If null, the thread will be created in the default group.
      daemon - The thread will be a daemon thread if this is true.
      priority - The thread's priority.
      Throws:
      IllegalArgumentException - if priority is not in between Thread.MIN_PRIORITY and Thread.MAX_PRIORITY
  • Method Details

    • getGroup

      public ThreadGroup getGroup()
      The ThreadGroup the thread will be created in.
      Returns:
      the ThreadGroup the thread will be created in.
    • isDaemon

      public boolean isDaemon()
      Returns true if the the thread will be daemon thread, returns false otherwise.
      Returns:
      true if the the thread will be daemon thread, returns false otherwise.
    • getPriority

      public int getPriority()
      The priority the thread should be created with.
      Returns:
      the priority the thread should be created with.
    • thread

      public Thread thread(Runnable r)
      Create a thread for the given runnable based on the values in this object. May be overridden to give full control over creation of thread.
      Returns:
      a thread to run r, unstarted
    • toString

      public String toString()
      Overrides:
      toString in class Object